Esempio n. 1
0
        /// <summary>
        ///     Creates the router control processor.
        /// </summary>
        /// <param name="identification">The identification.</param>
        /// <param name="inputGateway">The input gateway.</param>
        /// <param name="handlerRepository">The handler repository.</param>
        /// <param name="subscriptorsHelper">The subscriptors helper.</param>
        /// <returns></returns>
        public static IController CreateRouterControlProcessor(Identification identification,
                                                               IInputGateway<IControlMessage, MessageHeader> inputGateway,
                                                               IHandlerRepository handlerRepository,
                                                               ISubscriptorsHelper subscriptorsHelper)
        {
            IMessageBuilder defaultObjectBuilder = MessageBuilderFactory.CreateDefaultBuilder();

            return new RouterControlProcessor(identification, inputGateway, handlerRepository, subscriptorsHelper,
                                              defaultObjectBuilder)
                {
                    Logger = LoggerManager.Instance
                };
        }
Esempio n. 2
0
        /// <summary>
        ///     Creates the router control processor.
        /// </summary>
        /// <param name="identification">The identification.</param>
        /// <param name="inputGateway">The input gateway.</param>
        /// <param name="handlerRepository">The handler repository.</param>
        /// <param name="subscriptorsHelper">The subscriptors helper.</param>
        /// <returns></returns>
        public static IController CreateRouterControlProcessor(Identification identification,
                                                               IInputGateway <IControlMessage, MessageHeader> inputGateway,
                                                               IHandlerRepository handlerRepository,
                                                               ISubscriptorsHelper subscriptorsHelper)
        {
            IMessageBuilder defaultObjectBuilder = MessageBuilderFactory.CreateDefaultBuilder();

            return(new RouterControlProcessor(identification, inputGateway, handlerRepository, subscriptorsHelper,
                                              defaultObjectBuilder)
            {
                Logger = LoggerManager.Instance
            });
        }
Esempio n. 3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RouterControlProcessor" /> class.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <param name="subscriptonsHelper">The subscriptors helper.</param>
 /// <param name="messageBuilder">The message builder.</param>
 internal RouterControlProcessor(Identification identification,
                                 IInputGateway<IControlMessage, MessageHeader> inputGateway,
                                 IHandlerRepository handlerRepository,
                                 ISubscriptorsHelper subscriptonsHelper,
                                 IMessageBuilder messageBuilder)
 {
     ConfigureStateMachine();
     _identification = identification;
     _inputGateway = inputGateway;
     _inputGateway.OnMessage += MessageReceived;
     _handlerRepository = handlerRepository;
     _subscriptonsHelper = subscriptonsHelper;
     _subscriptonsHelper.Controller = this;
     _messageBuilder = messageBuilder;
 }
Esempio n. 4
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RouterControlProcessor" /> class.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <param name="subscriptonsHelper">The subscriptors helper.</param>
 /// <param name="messageBuilder">The message builder.</param>
 internal RouterControlProcessor(Identification identification,
                                 IInputGateway <IControlMessage, MessageHeader> inputGateway,
                                 IHandlerRepository handlerRepository,
                                 ISubscriptorsHelper subscriptonsHelper,
                                 IMessageBuilder messageBuilder)
 {
     ConfigureStateMachine();
     _identification                = identification;
     _inputGateway                  = inputGateway;
     _inputGateway.OnMessage       += MessageReceived;
     _handlerRepository             = handlerRepository;
     _subscriptonsHelper            = subscriptonsHelper;
     _subscriptonsHelper.Controller = this;
     _messageBuilder                = messageBuilder;
 }
 /// <summary>
 ///     Loads the helpers.
 /// </summary>
 /// <returns></returns>
 private RouterControlConfigurator LoadHelpers()
 {
     _subscriptorsHelpers = new SubscriptorsHelper(new MemorySubscriptorsRepository(), _subscriptorsPersiter);
     return(this);
 }
Esempio n. 6
0
 /// <summary>
 ///     Loads the helpers.
 /// </summary>
 /// <returns></returns>
 private RouterControlConfigurator LoadHelpers()
 {
     _subscriptorsHelpers = new SubscriptorsHelper(new MemorySubscriptorsRepository(), _subscriptorsPersiter);
     return this;
 }