Created
July 28, 2021 00:31
-
-
Save TBertuzzi/88678e88ba84dc796e10736cd440104e to your computer and use it in GitHub Desktop.
EventAggregator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace XamarinFormsEventAggregator.Events | |
{ | |
public interface IEventAggregator | |
{ | |
// Envia Mensagem e aguarda para ser processado na UI thread antes de retornar | |
void SendMessage<T>(T message); | |
// Publica a mensagem para processamento posterior na UI thread , retornando imediatamente. | |
void PostMessage<T>(T message); | |
//Registra o Delegate | |
Action<T> RegisterHandler<T>(Action<T> eventHandler); | |
//retira o registro do Delegate | |
void UnregisterHandler<T>(Action<T> eventHandler); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment