示例#1
0
        public void HandleMessage(IMessage message)
        {
            var typedMessage = (ITypedMessage)message;
            var handlerType  = _resolver.GetHandlersTypesForMessage(typedMessage).Single();
            var factory      = TypedMessageHandlerFactory.ForMessage(typedMessage);
            var module       = _moduleFactory.GetModule(handlerType);
            var handler      = factory.GetHandlers(module).Single();

            handler.Handle(typedMessage);
        }
 internal void PrepHandlers(TypedMessageHandlerFactory typedMessageHandlerFactory)
 {
     _handlerExecutionMode       = HandlerExecutionMode.Execution;
     _typedMessageHandlerFactory = typedMessageHandlerFactory;
     RegisterHandlers();
 }
 public TypedMessageHandlerExecution(TypedMessageHandlerFactory context, MessageModule module)
 {
     _module  = module;
     _context = context;
 }