Пример #1
0
 public WebSocketCollector(WebSocketConfig config, string exchange, string coin, CoinPair pair, IDatabase db, ILogger logger)
 {
     _config    = config;
     _exchange  = exchange;
     _coin      = coin;
     _pair      = pair;
     _db        = db;
     _logger    = logger;
     _webSocket = new WebSocket(_config.Url);
 }
        public WebSocketCollectService(ILogger logger, string exchange)
        {
            _logger   = logger;
            _exchange = exchange;
            _config   = GetConfig(exchange);
            var redis = ConnectionMultiplexer.Connect("127.0.0.1:6379");

            _db         = redis.GetDatabase();
            _collectors = new Dictionary <string, WebSocketCollector>();
        }