Beispiel #1
0
        private void OnArrayMessage(string msg)
        {
            var parsed = BitfinexSerialization.Deserialize <JArray>(msg);

            if (parsed.Count() < 2)
            {
                Log.Warn(L("Invalid message format, too low items"));
                return;
            }

            var channelId = (int)parsed[0];

            if (!_channelIdToHandler.ContainsKey(channelId))
            {
                Log.Debug($"Unrecognized channel id '{channelId}', ignoring..");
                return;
            }

            _channelIdToHandler[channelId](parsed, Configuration);
        }
 public BitfinexPublicHandler(BitfinexClientStreams streams, BitfinexChannelList channelIdToHandler)
 {
     _streams            = streams;
     _channelIdToHandler = channelIdToHandler;
 }
        public BitfinexAuthenticatedHandler(BitfinexClientStreams streams, BitfinexChannelList channelIdToHandler)
        {
            _streams = streams;

            channelIdToHandler[0] = HandleAccountInfo;
        }