public TCompactProtocol(TTransport trans)
     : base(trans)
 {
     ttypeToCompactType[(int)TType.Stop] = Types.STOP;
     ttypeToCompactType[(int)TType.Bool] = Types.BOOLEAN_TRUE;
     ttypeToCompactType[(int)TType.Byte] = Types.BYTE;
     ttypeToCompactType[(int)TType.I16] = Types.I16;
     ttypeToCompactType[(int)TType.I32] = Types.I32;
     ttypeToCompactType[(int)TType.I64] = Types.I64;
     ttypeToCompactType[(int)TType.Double] = Types.DOUBLE;
     ttypeToCompactType[(int)TType.String] = Types.BINARY;
     ttypeToCompactType[(int)TType.List] = Types.LIST;
     ttypeToCompactType[(int)TType.Set] = Types.SET;
     ttypeToCompactType[(int)TType.Map] = Types.MAP;
     ttypeToCompactType[(int)TType.Struct] = Types.STRUCT;
 }
        public TBinaryProtocol(TTransport trans, bool strictRead, bool strictWrite)
			:base(trans)
		{
			strictRead_ = strictRead;
			strictWrite_ = strictWrite;
		}
        public TBinaryProtocol(TTransport trans)
			: this(trans, false, true)
		{
		}
 public TProtocol GetProtocol(TTransport trans)
 {
     return new TBinaryProtocol(trans, strictRead_, strictWrite_);
 }
Beispiel #5
0
		protected TProtocol(TTransport trans)
		{
			this.trans = trans;
		}
 public TProtocol GetProtocol(TTransport trans)
 {
     return new TCompactProtocol(trans);
 }
		///<summary>
		/// TJSONProtocol Constructor
		///</summary>
		public TJSONProtocol(TTransport trans)
			: base(trans)
		{
			context = new JSONBaseContext(this);
			reader = new LookaheadReader(this);
		}
 public TProtocol GetProtocol(TTransport trans)
 {
     return new TJSONProtocol(trans);
 }