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