示例#1
0
 /// <summary>
 ///     Creates the router processor.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="routerOutputHelper">The router output helper.</param>
 /// <returns></returns>
 public static IProcessor CreateRouterProcessor(Identification identification,
                                                IInputGateway<byte[], RouterHeader> inputGateway,
                                                IRouterOutputHelper routerOutputHelper)
 {
     return new RouterProcessor(identification, inputGateway, routerOutputHelper)
         {
             Logger = LoggerManager.Instance
         };
 }
示例#2
0
 /// <summary>
 ///     Creates the router processor.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="routerOutputHelper">The router output helper.</param>
 /// <returns></returns>
 public static IProcessor CreateRouterProcessor(Identification identification,
                                                IInputGateway <byte[], RouterHeader> inputGateway,
                                                IRouterOutputHelper routerOutputHelper)
 {
     return(new RouterProcessor(identification, inputGateway, routerOutputHelper)
     {
         Logger = LoggerManager.Instance
     });
 }
示例#3
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="RouterProcessor" /> class.
        /// </summary>
        /// <param name="identification">The identification.</param>
        /// <param name="inputGateway">The message receiver.</param>
        /// <param name="routerOutputHelper">The bus sender helper.</param>
        internal RouterProcessor(Identification identification, IInputGateway<byte[], RouterHeader> inputGateway,
                                 IRouterOutputHelper routerOutputHelper)
        {
            JoinedBusInfo = BusInfo.Create();

            ConfigureStateMachine();
            _inputGateway = inputGateway;
            _identification = identification;
            _routerOutputHelper = routerOutputHelper;
            _inputGateway.OnMessage += MessageReceived;
            _stateMachine.ChangeState(ProcessorStatus.Configured);
            _serializer = new JsonDataContractSerializer();
        }
示例#4
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="RouterProcessor" /> class.
        /// </summary>
        /// <param name="identification">The identification.</param>
        /// <param name="inputGateway">The message receiver.</param>
        /// <param name="routerOutputHelper">The bus sender helper.</param>
        internal RouterProcessor(Identification identification, IInputGateway <byte[], RouterHeader> inputGateway,
                                 IRouterOutputHelper routerOutputHelper)
        {
            JoinedBusInfo = BusInfo.Create();

            ConfigureStateMachine();
            _inputGateway            = inputGateway;
            _identification          = identification;
            _routerOutputHelper      = routerOutputHelper;
            _inputGateway.OnMessage += MessageReceived;
            _stateMachine.ChangeState(ProcessorStatus.Configured);
            _serializer = new JsonDataContractSerializer();
        }
 private RouterProcessorConfigurator CreateInput()
 {
     _routerOutputHelper = new RouterOutputHelper(new MemoryGatewaysRepository());
     return(this);
 }
 private RouterProcessorConfigurator CreateInput()
 {
     _routerOutputHelper = new RouterOutputHelper(new MemoryGatewaysRepository());
     return this;
 }