Beispiel #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)));
 }
Beispiel #2
0
 static EventChannel()
 {
     Default = new EventChannel();
 }
Beispiel #3
0
 public static void SubscribeOnUIThread <T>(this EventChannel eventChannel, Action eventHandler) where T : IEvent
 {
     eventChannel.Subscribe <T>(_ => App.Window.DispatcherQueue.TryEnqueue(() => eventHandler()));
 }