示例#1
0
        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);
            }
        }
示例#2
0
 private static IBusSubscriber SubscribeAllEvents(this IBusSubscriber subscriber)
 => subscriber.SubscribeAllMessages <IEvent>(nameof(IBusSubscriber.SubscribeEvent));
示例#3
0
 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());
 }
示例#5
0
 public static IBusSubscriber SubscribeAllEvents(this IBusSubscriber subscriber, bool excludeOperationsMessages = false, params Assembly[] assemblies)
 => subscriber.SubscribeAllMessages <IEvent>(nameof(IBusSubscriber.SubscribeEvent), excludeOperationsMessages, assemblies);
示例#6
0
 public static IBusSubscriber SubscribeAllCommands(this IBusSubscriber subscriber, bool excludeOperationsMessages = false, params Assembly[] assemblies)
 => subscriber.SubscribeAllMessages <ICommand>(nameof(IBusSubscriber.SubscribeCommand), excludeOperationsMessages, assemblies);