Ejemplo n.º 1
0
 public ChatConnection(IServiceProvider services, ChatHub chatHub, ProtocolFactory protocolFactory, IOptions <ProxyOptions> options, IOptions <SqlServerOptions> sqlOptions, ILogger <ChatConnection> logger)
 {
     _services        = services;
     _chatHub         = chatHub;
     _protocolFactory = protocolFactory;
     _options         = options.Value;
     _sqlOptions      = sqlOptions.Value;
     _logger          = logger;
 }
Ejemplo n.º 2
0
        public DeviceServer(ProtocolFactory protocolFactory, IServiceProvider services, FanoutHub fanoutHub, IOptions <ProxyOptions> options, IOptions <SqlServerOptions> sqlOptions, ILogger <DeviceServer> logger)
        {
            _fanoutHub = fanoutHub;
            _options   = options.Value;
            _logger    = logger;

            var stackBuilder = new StackBuilder(services);

            if (sqlOptions.Value.ConnectionString != null)
            {
                stackBuilder.Use <SqlServerMiddleware>();
            }

            var stack = stackBuilder.Build();

            _protocol = protocolFactory.Create(_options.ProtocolName, stack);
        }
Ejemplo n.º 3
0
 public ChatServer(ChatHub chatHub, IOptions <ProxyOptions> options, ILogger <ChatServer> logger)
 {
     _chatHub = chatHub;
     _options = options.Value;
     _logger  = logger;
 }
Ejemplo n.º 4
0
 public FanoutServer(FanoutHub fanoutHub, IOptions <ProxyOptions> options, ILogger <FanoutServer> logger)
 {
     _fanoutHub = fanoutHub;
     _options   = options.Value;
     _logger    = logger;
 }