コード例 #1
0
 public void SetUp()
 {
     autoSubscriptionStrategy = new AutoSubscriptionStrategy
     {
         HandlerRegistry = new MessageHandlerRegistry(new Conventions()),
         MessageRouter   = new StaticMessageRouter(KnownMessageTypes()),
         Conventions     = new Conventions()
     };
 }
コード例 #2
0
            protected override void OnStart()
            {
                foreach (var eventType in AutoSubscriptionStrategy.GetEventsToSubscribe()
                         .Where(t => !Conventions.IsInSystemConventionList(t))) //never auto-subscribe system messages
                {
                    Bus.Subscribe(eventType);

                    Logger.DebugFormat("Auto subscribed to event {0}", eventType);
                }
            }