예제 #1
0
        public Token PacketToToken(WebSocketPacket aPacket)
        {
            var byteArray       = aPacket.GetByteArray();
            var packetString    = WebSocketConvert.BytesToString(byteArray, WebSocketTypeEncoding.UTF8);
            var dictionary      = JsonConvert.DeserializeObject <Dictionary <string, object> >(packetString);
            var dictionaryToken = new DictionaryToken();

            dictionaryToken.SetDictionary(dictionary);
            return(dictionaryToken);
        }