예제 #1
0
 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;
 }
예제 #2
0
        public TBinaryProtocol(TTransport trans, bool strictRead, bool strictWrite)
			:base(trans)
		{
			strictRead_ = strictRead;
			strictWrite_ = strictWrite;
		}
예제 #3
0
        public TBinaryProtocol(TTransport trans)
			: this(trans, false, true)
		{
		}
예제 #4
0
 public TProtocol GetProtocol(TTransport trans)
 {
     return new TBinaryProtocol(trans, strictRead_, strictWrite_);
 }
예제 #5
0
		protected TProtocol(TTransport trans)
		{
			this.trans = trans;
		}
예제 #6
0
 public TProtocol GetProtocol(TTransport trans)
 {
     return new TCompactProtocol(trans);
 }
예제 #7
0
		///<summary>
		/// TJSONProtocol Constructor
		///</summary>
		public TJSONProtocol(TTransport trans)
			: base(trans)
		{
			context = new JSONBaseContext(this);
			reader = new LookaheadReader(this);
		}
예제 #8
0
 public TProtocol GetProtocol(TTransport trans)
 {
     return new TJSONProtocol(trans);
 }