コード例 #1
0
        public BalancerService(IOptions <BalancerConfiguration> configuration, NodeGateway nodeGateway)
        {
            Files = new Dictionary <string, NodeFileInfo>();

            _configuration = configuration.Value;
            _nodeGateway   = nodeGateway;
        }
コード例 #2
0
 public NodeStartupScenario(ITestOutputHelper output, TestableGateway testableGateway)
 {
     _testableGateway = testableGateway;
     _dbCtx           = testableGateway.DbCtx;
     _msgChannel      = new Mock <INodeMessageChannel>();
     _gtw             = testableGateway.CreateGateway(_msgChannel.Object);
     Logger.Debug("Gateway created with channel {0}", _msgChannel.GetHashCode());
 }
コード例 #3
0
        public IInstructionReceiver Create(string address)
        {
            var networkAddress = new NetworkAddress(address);

            var networkPoint = new NetworkPoint(
                networkAddress,
                NetworkTunnelFactory,
                SocketFactory,
                _recorder);

            var nodeGateWay = new NodeGateway(
                networkPoint,
                SessionFactory,
                _recorder);

            var instructionReceiver = new InstructionReceiver(
                nodeGateWay,
                new SessionHolder(_recorder),
                _recorder);

            return(instructionReceiver);
        }