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


C# TProtocol.ReadString方法代码示例

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


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

示例1: 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) {
           Identifier = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Key = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Glympse,项目名称:evernote-sdk-csharp,代码行数:34,代码来源:EDAMNotFoundException.cs

示例2: 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.Map) {
           {
             MessageMap = new Dictionary<string, Dictionary<int, string>>();
             TMap _map30 = iprot.ReadMapBegin();
             for( int _i31 = 0; _i31 < _map30.Count; ++_i31)
             {
               string _key32;
               Dictionary<int, string> _val33;
               _key32 = iprot.ReadString();
               {
                 _val33 = new Dictionary<int, string>();
                 TMap _map34 = iprot.ReadMapBegin();
                 for( int _i35 = 0; _i35 < _map34.Count; ++_i35)
                 {
                   int _key36;
                   string _val37;
                   _key36 = iprot.ReadI32();
                   _val37 = iprot.ReadString();
                   _val33[_key36] = _val37;
                 }
                 iprot.ReadMapEnd();
               }
               MessageMap[_key32] = _val33;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:51,代码来源:MessageConfigTable.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 10:
         if (field.Type == TType.String) {
           BulletinBoardContent = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:sgyli7,项目名称:ClientFrameWork,代码行数:27,代码来源:CSUpdateArmyBulletinBoardContentMsg.cs

示例4: Read

 public void Read (TProtocol iprot)
 {
   bool isset_msg = 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) {
           Msg = iprot.ReadString();
           isset_msg = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_msg)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:bcardi,项目名称:storm-net-adapter,代码行数:31,代码来源:AlreadyAliveException.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) {
           CoMsProcedimento = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           Quantidade = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:esusab,项目名称:integracao,代码行数:34,代码来源:ProcedimentoQuantidadeThrift.cs

示例6: 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.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Settings = new BootstrapSettings();
           Settings.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:evernote,项目名称:evernote-demo-metro,代码行数:35,代码来源:BootstrapProfile.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) {
           What = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           Err = (ErrorCode)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:CJDevWorks,项目名称:SavariWala,代码行数:34,代码来源:ServerError.cs

示例8: Read

 public void Read (TProtocol iprot)
 {
   iprot.IncrementRecursionDepth();
   try
   {
     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) {
             Id = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
开发者ID:Jens-G,项目名称:Redis-Samples,代码行数:35,代码来源:InstanceDescriptor.cs

示例9: 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 10:
         if (field.Type == TType.String) {
           Name = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 20:
         if (field.Type == TType.Bool) {
           IsVisable = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:34,代码来源:RegularityGameOption.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 3:
     if (field.Type == TType.String) {
       Column_family = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.String) {
       Super_column = iprot.ReadBinary();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
开发者ID:brooklynDev,项目名称:fluentcassandra,代码行数:34,代码来源:ColumnParent.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 1:
     if (field.Type == TType.String) {
       this.action_id = iprot.ReadString();
       this.__isset.action_id = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
开发者ID:carlosefr,项目名称:sapo-broker,代码行数:28,代码来源:Accepted.cs

示例12: Process

 public bool Process(TProtocol iprot, TProtocol oprot)
 {
     var received = iprot.ReadString();
     oprot.WriteString(received);
     oprot.Transport.Flush();
     return true;
 }
开发者ID:sky1737,项目名称:thriftclient,代码行数:7,代码来源:Run.cs

示例13: Read

 public void Read (TProtocol iprot)
 {
   iprot.IncrementRecursionDepth();
   try
   {
     bool isset_MessageName = 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) {
             MessageName = iprot.ReadString();
             isset_MessageName = true;
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.Map) {
             {
               MessageBody = new Dictionary<string, BaseMsg>();
               TMap _map13 = iprot.ReadMapBegin();
               for( int _i14 = 0; _i14 < _map13.Count; ++_i14)
               {
                 string _key15;
                 BaseMsg _val16;
                 _key15 = iprot.ReadString();
                 _val16 = new BaseMsg();
                 _val16.Read(iprot);
                 MessageBody[_key15] = _val16;
               }
               iprot.ReadMapEnd();
             }
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
     if (!isset_MessageName)
       throw new TProtocolException(TProtocolException.INVALID_DATA);
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
开发者ID:wsycarlos,项目名称:ARIA,代码行数:59,代码来源:NetMsg.cs

示例14: 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.columnName = iprot.ReadString();
         this.__isset.columnName = true;
       } else {
         TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.String) {
         this.value = iprot.ReadString();
         this.__isset.value = true;
       } else {
         TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.I32) {
         this.timestamp = iprot.ReadI32();
         this.__isset.timestamp = true;
       } else {
         TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
开发者ID:jiansheng,项目名称:cassandra,代码行数:44,代码来源:column_t.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.Set) {
           {
             KeysOnly = new THashSet<string>();
             TSet _set8 = iprot.ReadSetBegin();
             for( int _i9 = 0; _i9 < _set8.Count; ++_i9)
             {
               string _elem10 = null;
               _elem10 = iprot.ReadString();
               KeysOnly.Add(_elem10);
             }
             iprot.ReadSetEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             FullMap = new Dictionary<string, string>();
             TMap _map11 = iprot.ReadMapBegin();
             for( int _i12 = 0; _i12 < _map11.Count; ++_i12)
             {
               string _key13;
               string _val14;
               _key13 = iprot.ReadString();
               _val14 = iprot.ReadString();
               FullMap[_key13] = _val14;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Glympse,项目名称:evernote-sdk-csharp,代码行数:56,代码来源:LazyMap.cs


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