GetTypeIDForTypeName() private static method

private static GetTypeIDForTypeName ( byte name ) : TType
name byte
return TType
Beispiel #1
0
        public override TSet ReadSetBegin()
        {
            TSet typeIDForTypeName = new TSet();

            this.ReadJSONArrayStart();
            typeIDForTypeName.ElementType = TJSONProtocol.GetTypeIDForTypeName(this.ReadJSONString(false));
            typeIDForTypeName.Count       = (int)this.ReadJSONInteger();
            return(typeIDForTypeName);
        }
Beispiel #2
0
        public override TMap ReadMapBegin()
        {
            TMap typeIDForTypeName = new TMap();

            this.ReadJSONArrayStart();
            typeIDForTypeName.KeyType   = TJSONProtocol.GetTypeIDForTypeName(this.ReadJSONString(false));
            typeIDForTypeName.ValueType = TJSONProtocol.GetTypeIDForTypeName(this.ReadJSONString(false));
            typeIDForTypeName.Count     = (int)this.ReadJSONInteger();
            this.ReadJSONObjectStart();
            return(typeIDForTypeName);
        }
Beispiel #3
0
        public override TField ReadFieldBegin()
        {
            TField typeIDForTypeName = new TField();

            if (this.reader.Peek() != TJSONProtocol.RBRACE[0])
            {
                typeIDForTypeName.ID = (short)this.ReadJSONInteger();
                this.ReadJSONObjectStart();
                typeIDForTypeName.Type = TJSONProtocol.GetTypeIDForTypeName(this.ReadJSONString(false));
            }
            else
            {
                typeIDForTypeName.Type = TType.Stop;
            }
            return(typeIDForTypeName);
        }