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); }
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); }
public static void Subscribe <T>(this IEventBusService eventBusService, ChannelId channel, ILinkHandler handle, Action <T> action, int priority = 0) { eventBusService.Subscribe(channel, handle, action, priority); }
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); }
public static void Subscribe <T>(this IEventBusService eventBusService, ILinkHandler handle, Action <T> action, int priority = 0) { eventBusService.Subscribe(DEFAULT_CHANNEL, handle, action, priority); }