private bool HandleObjectMessage(string msg)
        {
            var gmessage = GenesysMessage.Parse(msg);

            return
                (PongResponse.TryHandle(gmessage, Streams.PongSubject) ||
                 HeartbeatResponse.TryHandle(gmessage, Streams.HeartbeatsSubject) ||
                 SocketClosingResponse.TryHandle(gmessage, Streams.SocketClosingSubject) ||
                 SubscriptionResponse.TryHandle(gmessage, Streams.SubscriptionsSubject, _subscriptions));
        }
예제 #2
0
        private bool HandleObjectMessage(string msg)
        {
            var response = CoinbaseJsonSerializer.Deserialize <JObject>(msg);

            // ********************
            // ADD OBJECT HANDLERS BELOW
            // ********************

            return

                (HeartbeatResponse.TryHandle(response, Streams.HeartbeatSubject) ||
                 TradeResponse.TryHandle(response, Streams.TradesSubject) ||
                 OrderBookUpdateResponse.TryHandle(response, Streams.OrderBookUpdateSubject) ||
                 OrderBookSnapshotResponse.TryHandle(response, Streams.OrderBookSnapshotSubject) ||
                 TickerResponse.TryHandle(response, Streams.TickerSubject) ||

                 ErrorResponse.TryHandle(response, Streams.ErrorSubject) ||
                 SubscribeResponse.TryHandle(response, Streams.SubscribeSubject) ||

                 false);
        }