예제 #1
0
 ///<summary>
 /// Read a byte that must match b[0]; otherwise an exception is thrown.
 /// Marked protected to avoid synthetic accessor in JSONListContext.Read
 /// and JSONPairContext.Read
 ///</summary>
 protected void ReadJSONSyntaxChar(byte[] b)
 {
     byte ch = reader.Read();
     if (ch != b[0])
     {
         throw new TProtocolException(TProtocolException.INVALID_DATA,
                                      "Unexpected character:" + (char)ch);
     }
 }
예제 #2
0
        ///<summary>
        /// Read a byte that must match b[0]; otherwise an exception is thrown.
        /// Marked protected to avoid synthetic accessor in JSONListContext.Read
        /// and JSONPairContext.Read
        ///</summary>
        protected void ReadJSONSyntaxChar(byte[] b)
        {
            byte ch = reader.Read();

            if (ch != b[0])
            {
                throw new TProtocolException(
                          TProtocolException.INVALID_DATA,
                          "Context:" + context.ToString() +
                          " Expected character:" + (char)b[0] +
                          " Unexpected character:" + (char)ch);
            }
        }