Example #1
0
 public static void Subscribe <T>(this IEventBusService eventBusService, ChannelId channel, ILinkHandler handle, Action <T> action, Func <T, bool> filter, int priority = 0)
 {
     eventBusService.Subscribe <T>(channel, handle, (e) =>
     {
         if (filter(e))
         {
             action(e);
         }
     }, priority);
 }
 public Task StartAsync(CancellationToken cancellationToken)
 {
     unsubscriber = eventBus.Subscribe(this);
     return(Task.CompletedTask);
 }
Example #3
0
 public static void Subscribe <T>(this IEventBusService eventBusService, ChannelId channel, ILinkHandler handle, Action action, Func <T, bool> filter, int priority = 0)
 {
     eventBusService.Subscribe(channel, handle, (T _) => action(), filter, priority);
 }
Example #4
0
 public static void Subscribe <T>(this IEventBusService eventBusService, ChannelId channel, ILinkHandler handle, Action <T> action, int priority = 0)
 {
     eventBusService.Subscribe(channel, handle, action, priority);
 }
Example #5
0
 public static void Subscribe <T>(this IEventBusService eventBusService, ILinkHandler handle, Action action, Func <T, bool> filter, int priority = 0)
 {
     eventBusService.Subscribe(DEFAULT_CHANNEL, handle, (T _) => action(), filter, priority);
 }
Example #6
0
 public static void Subscribe <T>(this IEventBusService eventBusService, ILinkHandler handle, Action <T> action, int priority = 0)
 {
     eventBusService.Subscribe(DEFAULT_CHANNEL, handle, action, priority);
 }