Exemplo n.º 1
0
 public static void SubscribeOn <T>(this EventChannel eventChannel, DispatcherQueue dispatcherQueue, Action <T> eventHandler) where T : IEvent
 {
     eventChannel.Subscribe <T>(t => dispatcherQueue.TryEnqueue(() => eventHandler(t)));
 }
Exemplo n.º 2
0
 public static void SubscribeOnUIThread <T>(this EventChannel eventChannel, Action eventHandler) where T : IEvent
 {
     eventChannel.Subscribe <T>(_ => App.Window.DispatcherQueue.TryEnqueue(() => eventHandler()));
 }