当前位置: 首页>>代码示例>>C#>>正文


C# TProtocol.ReadBinary方法代码示例

本文整理汇总了C#中Thrift.Protocol.TProtocol.ReadBinary方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.ReadBinary方法的具体用法?C# TProtocol.ReadBinary怎么用?C# TProtocol.ReadBinary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Thrift.Protocol.TProtocol的用法示例。


在下文中一共展示了TProtocol.ReadBinary方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Read

 public void Read(TProtocol iprot)
 {
     TField field;
       TStruct struc = iprot.ReadStructBegin();
       while (true)
       {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) {
       break;
     }
     switch (field.ID)
     {
       case 1:
     if (field.Type == TType.String) {
       this.startKey = iprot.ReadBinary();
       this.__isset.startKey = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       this.endKey = iprot.ReadBinary();
       this.__isset.endKey = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.I64) {
       this.id = iprot.ReadI64();
       this.__isset.id = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.String) {
       this.name = iprot.ReadBinary();
       this.__isset.name = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 5:
     if (field.Type == TType.Byte) {
       this.version = iprot.ReadByte();
       this.__isset.version = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
开发者ID:charliem,项目名称:OCM,代码行数:60,代码来源:TRegionInfo.cs

示例2: Read

 public void Read(TProtocol iprot)
 {
     TField field;
       TStruct struc = iprot.ReadStructBegin();
       while (true)
       {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) {
       break;
     }
     switch (field.ID)
     {
       case 1:
     if (field.Type == TType.String) {
       this.row = iprot.ReadBinary();
       this.__isset.row = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.Map) {
       {
         this.columns = new Dictionary<byte[], TCell>();
         TMap _map4 = iprot.ReadMapBegin();
         for( int _i5 = 0; _i5 < _map4.Count; ++_i5)
         {
           byte[] _key6;
           TCell _val7;
           _key6 = iprot.ReadBinary();
           _val7 = new TCell();
           _val7.Read(iprot);
           this.columns[_key6] = _val7;
         }
         iprot.ReadMapEnd();
       }
       this.__isset.columns = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
开发者ID:charliem,项目名称:OCM,代码行数:49,代码来源:TRowResult.cs

示例3: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           ColumnName = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Cell = new TCell();
           Cell.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:acesir,项目名称:hdfs-daemon,代码行数:35,代码来源:TColumn.cs

示例4: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.I32) {
           ResultCode = (ResultCode)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Data = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:shshen,项目名称:bigqueue,代码行数:34,代码来源:QueueResponse.cs

示例5: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           PlayerHand = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:serenitii,项目名称:jeisimple,代码行数:27,代码来源:HandInfoOpted.cs

示例6: Read

 public void Read(TProtocol iprot)
 {
     TField field;
       TStruct struc = iprot.ReadStructBegin();
       while (true)
       {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) {
       break;
     }
     switch (field.ID)
     {
       case 1:
     if (field.Type == TType.Bool) {
       this.isDelete = iprot.ReadBool();
       this.__isset.isDelete = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       this.column = iprot.ReadBinary();
       this.__isset.column = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.String) {
       this.value = iprot.ReadBinary();
       this.__isset.value = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
开发者ID:charliem,项目名称:OCM,代码行数:44,代码来源:Mutation.cs

示例7: Read

 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.String)
                 {
                     this.Row = iprot.ReadBinary();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.List)
                 {
                     {
                         this.Mutations = new List<Mutation>();
                         TList _list0 = iprot.ReadListBegin();
                         for (int _i1 = 0; _i1 < _list0.Count; ++_i1)
                         {
                             var _elem2 = new Mutation();
                             _elem2 = new Mutation();
                             _elem2.Read(iprot);
                             this.Mutations.Add(_elem2);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
开发者ID:nordbergm,项目名称:HBaseNet,代码行数:52,代码来源:BatchMutation.cs

示例8: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           Name = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.List) {
           {
             Columns = new List<CounterColumn>();
             TList _list4 = iprot.ReadListBegin();
             for( int _i5 = 0; _i5 < _list4.Count; ++_i5)
             {
               CounterColumn _elem6 = new CounterColumn();
               _elem6 = new CounterColumn();
               _elem6.Read(iprot);
               Columns.Add(_elem6);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Jacky1,项目名称:cassandra-sharp,代码行数:45,代码来源:CounterSuperColumn.cs

示例9: Read

 public void Read (TProtocol iprot)
 {
   bool isset_name = false;
   bool isset_bits = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           Name = iprot.ReadString();
           isset_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Bits = iprot.ReadBinary();
           isset_bits = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_name)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_bits)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:bcardi,项目名称:storm-net-adapter,代码行数:42,代码来源:ThriftSerializedObject.cs

示例10: Read

 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.String)
                 {
                     this.Value = iprot.ReadBinary();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.I64)
                 {
                     this.Timestamp = iprot.ReadI64();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
开发者ID:nordbergm,项目名称:HBaseNet,代码行数:41,代码来源:TCell.cs

示例11: Read

 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 0:
       if (field.Type == TType.Map) {
     {
       Success = new Dictionary<byte[], List<ColumnOrSuperColumn>>();
       TMap _map91 = iprot.ReadMapBegin();
       for( int _i92 = 0; _i92 < _map91.Count; ++_i92)
       {
         byte[] _key93;
         List<ColumnOrSuperColumn> _val94;
         _key93 = iprot.ReadBinary();
         {
           _val94 = new List<ColumnOrSuperColumn>();
           TList _list95 = iprot.ReadListBegin();
           for( int _i96 = 0; _i96 < _list95.Count; ++_i96)
           {
             ColumnOrSuperColumn _elem97 = new ColumnOrSuperColumn();
             _elem97 = new ColumnOrSuperColumn();
             _elem97.Read(iprot);
             _val94.Add(_elem97);
           }
           iprot.ReadListEnd();
         }
         Success[_key93] = _val94;
       }
       iprot.ReadMapEnd();
     }
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     Ire = new InvalidRequestException();
     Ire.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.Struct) {
     Ue = new UnavailableException();
     Ue.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Struct) {
     Te = new TimedOutException();
     Te.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
开发者ID:razzmatazz,项目名称:cassandra-sharp-client,代码行数:74,代码来源:Cassandra.cs

示例12: Read

 public void Read(TProtocol iprot)
 {
     TField field;
       iprot.ReadStructBegin();
       while (true)
       {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) {
       break;
     }
     switch (field.ID)
     {
       case 1:
     if (field.Type == TType.List) {
       {
         this.expressions = new List<IndexExpression>();
         TList _list8 = iprot.ReadListBegin();
         for( int _i9 = 0; _i9 < _list8.Count; ++_i9)
         {
           IndexExpression _elem10 = new IndexExpression();
           _elem10 = new IndexExpression();
           _elem10.Read(iprot);
           this.expressions.Add(_elem10);
         }
         iprot.ReadListEnd();
       }
       this.__isset.expressions = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       this.start_key = iprot.ReadBinary();
       this.__isset.start_key = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.I32) {
       this.count = iprot.ReadI32();
       this.__isset.count = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
开发者ID:chak71,项目名称:CassandraWorkbench,代码行数:55,代码来源:IndexClause.cs

示例13: Read

 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.I32)
                 {
                     status = (Status) iprot.ReadI32();
                     __isset.status = true;
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.Map)
                 {
                     {
                         headers = new Dictionary<string, string>();
                         TMap _map10 = iprot.ReadMapBegin();
                         for (int _i11 = 0; _i11 < _map10.Count; ++_i11)
                         {
                             string _key12;
                             string _val13;
                             _key12 = iprot.ReadString();
                             _val13 = iprot.ReadString();
                             headers[_key12] = _val13;
                         }
                         iprot.ReadMapEnd();
                     }
                     __isset.headers = true;
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 3:
                 if (field.Type == TType.String)
                 {
                     body = iprot.ReadBinary();
                     __isset.body = true;
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
开发者ID:baranov1ch,项目名称:NEST,代码行数:66,代码来源:RestResponse.cs

示例14: Read

 public void Read(TProtocol iprot)
 {
     TField field;
       iprot.ReadStructBegin();
       while (true)
       {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) {
       break;
     }
     switch (field.ID)
     {
       case 1:
     if (field.Type == TType.String) {
       Start_key = iprot.ReadBinary();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.String) {
       End_key = iprot.ReadBinary();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.String) {
       Start_token = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.String) {
       End_token = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 6:
     if (field.Type == TType.List) {
       {
         Row_filter = new List<IndexExpression>();
         TList _list16 = iprot.ReadListBegin();
         for( int _i17 = 0; _i17 < _list16.Count; ++_i17)
         {
           IndexExpression _elem18 = new IndexExpression();
           _elem18 = new IndexExpression();
           _elem18.Read(iprot);
           Row_filter.Add(_elem18);
         }
         iprot.ReadListEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 5:
     if (field.Type == TType.I32) {
       Count = iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
开发者ID:nativex,项目名称:fluentcassandra,代码行数:73,代码来源:KeyRange.cs

示例15: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.List) {
           {
             Expressions = new List<IndexExpression>();
             TList _list12 = iprot.ReadListBegin();
             for( int _i13 = 0; _i13 < _list12.Count; ++_i13)
             {
               IndexExpression _elem14 = new IndexExpression();
               _elem14 = new IndexExpression();
               _elem14.Read(iprot);
               Expressions.Add(_elem14);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Start_key = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           Count = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:juanbucz,项目名称:fluentcassandra,代码行数:52,代码来源:IndexClause.cs


注:本文中的Thrift.Protocol.TProtocol.ReadBinary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。