Exemplo n.º 1
0
        private MessageDispatcher CreateAndStartDispatcher(IDispatcherTaskSchedulerFactory taskSchedulerFactory)
        {
            var messageDispatcher = new MessageDispatcher(_pipeManagerMock.Object, new IMessageHandlerInvokerLoader[]
            {
                new SyncMessageHandlerInvokerLoader(_containerMock.Object),
                new AsyncMessageHandlerInvokerLoader(_containerMock.Object),
            }, taskSchedulerFactory);

            messageDispatcher.ConfigureAssemblyFilter(x => x == GetType().Assembly);
            messageDispatcher.ConfigureHandlerFilter(type => type != typeof(SyncMessageHandlerInvokerLoaderTests.WrongAsyncHandler));
            messageDispatcher.Start();
            return(messageDispatcher);
        }
Exemplo n.º 2
0
        private MessageDispatcher CreateAndStartDispatcher(IDispatcherTaskSchedulerFactory taskSchedulerFactory)
        {
            var messageDispatcher = new MessageDispatcher(_pipeManagerMock.Object, new IMessageHandlerInvokerLoader[]
            {
                new SyncMessageHandlerInvokerLoader(_containerMock.Object),
                new AsyncMessageHandlerInvokerLoader(_containerMock.Object),
            }, taskSchedulerFactory);

            messageDispatcher.ConfigureAssemblyFilter(x => x == GetType().Assembly);
            messageDispatcher.ConfigureHandlerFilter(type => type != typeof(SyncMessageHandlerInvokerLoaderTests.WrongAsyncHandler));
            messageDispatcher.Start();
            return messageDispatcher;
        }
Exemplo n.º 3
0
 public MessageDispatcher(IPipeManager pipeManager, IMessageHandlerInvokerLoader[] invokerLoaders, IDispatcherTaskSchedulerFactory taskSchedulerFactory)
 {
     _pipeManager = pipeManager;
     _invokerLoaders = invokerLoaders;
     _taskSchedulerFactory = taskSchedulerFactory;
 }
Exemplo n.º 4
0
 public MessageDispatcher(IPipeManager pipeManager, IMessageHandlerInvokerLoader[] invokerLoaders, IDispatcherTaskSchedulerFactory taskSchedulerFactory)
 {
     _pipeManager          = pipeManager;
     _invokerLoaders       = invokerLoaders;
     _taskSchedulerFactory = taskSchedulerFactory;
 }