protected virtual void SubscribeEventAndMessageBus(IBusSubscriber bus) { if (UseSignalR) { bus.SubscribeEvent <OperationPending>(@namespace: "operations") .SubscribeEvent <OperationCompleted>(@namespace: "operations") .SubscribeEvent <OperationRejected>(@namespace: "operations"); } if (DomainType != null) { bus.SubscribeAllMessages(true, DomainType.Assembly); // bus.SubscribeOnRejected(DomainType.Assembly); } }
private static IBusSubscriber SubscribeAllEvents(this IBusSubscriber subscriber) => subscriber.SubscribeAllMessages <IEvent>(nameof(IBusSubscriber.SubscribeEvent));
private static IBusSubscriber SubscribeAllCommands(this IBusSubscriber subscriber) => subscriber.SubscribeAllMessages <ICommand>(nameof(IBusSubscriber.SubscribeCommand));
protected override void SubscribeEventAndMessageBus(IBusSubscriber bus) { base.SubscribeEventAndMessageBus(bus); bus.SubscribeAllMessages(true, Assembly.GetEntryAssembly(), Assembly.GetExecutingAssembly()); }
public static IBusSubscriber SubscribeAllEvents(this IBusSubscriber subscriber, bool excludeOperationsMessages = false, params Assembly[] assemblies) => subscriber.SubscribeAllMessages <IEvent>(nameof(IBusSubscriber.SubscribeEvent), excludeOperationsMessages, assemblies);
public static IBusSubscriber SubscribeAllCommands(this IBusSubscriber subscriber, bool excludeOperationsMessages = false, params Assembly[] assemblies) => subscriber.SubscribeAllMessages <ICommand>(nameof(IBusSubscriber.SubscribeCommand), excludeOperationsMessages, assemblies);