當前位置: 首頁>>代碼示例>>C#>>正文


C# TProtocol.WriteString方法代碼示例

本文整理匯總了C#中Thrift.Protocol.TProtocol.WriteString方法的典型用法代碼示例。如果您正苦於以下問題:C# TProtocol.WriteString方法的具體用法?C# TProtocol.WriteString怎麽用?C# TProtocol.WriteString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Thrift.Protocol.TProtocol的用法示例。


在下文中一共展示了TProtocol.WriteString方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("InvalidRequestException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "why";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Why);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
開發者ID:cosh,項目名稱:C4,代碼行數:13,代碼來源:InvalidRequestException.cs

示例3: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("AlreadyAliveException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "msg";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Msg);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
開發者ID:bcardi,項目名稱:storm-net-adapter,代碼行數:13,代碼來源:AlreadyAliveException.cs

示例4: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("LSSupervisorId");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "supervisor_id";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Supervisor_id);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
開發者ID:bcardi,項目名稱:storm-net-adapter,代碼行數:13,代碼來源:LSSupervisorId.cs

示例5: Write

 public void Write(TProtocol oprot)
 {
     TStruct struc = new TStruct("AuthenticationRequest");
       oprot.WriteStructBegin(struc);
       TField field = new TField();
       if (Credentials != null && __isset.credentials) {
     field.Name = "credentials";
     field.Type = TType.Map;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.String, Credentials.Count));
       foreach (string _iter32 in Credentials.Keys)
       {
     oprot.WriteString(_iter32);
     oprot.WriteString(Credentials[_iter32]);
       }
       oprot.WriteMapEnd();
     }
     oprot.WriteFieldEnd();
       }
       oprot.WriteFieldStop();
       oprot.WriteStructEnd();
 }
開發者ID:brooklynDev,項目名稱:fluentcassandra,代碼行數:24,代碼來源:AuthenticationRequest.cs

示例6: Write

 public void Write(TProtocol oprot)
 {
     TStruct struc = new TStruct("get_column_args");
       oprot.WriteStructBegin(struc);
       TField field = new TField();
       if (this.tablename != null) {
     field.Name = "tablename";
     field.Type = TType.String;
     field.ID = -1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(this.tablename);
     oprot.WriteFieldEnd();
       }
       if (this.key != null) {
     field.Name = "key";
     field.Type = TType.String;
     field.ID = -2;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(this.key);
     oprot.WriteFieldEnd();
       }
       if (this.columnFamily_column != null) {
     field.Name = "columnFamily_column";
     field.Type = TType.String;
     field.ID = -3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(this.columnFamily_column);
     oprot.WriteFieldEnd();
       }
       oprot.WriteFieldStop();
       oprot.WriteStructEnd();
 }
開發者ID:jiansheng,項目名稱:cassandra,代碼行數:32,代碼來源:Cassandra.cs

示例7: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SendChatCharInfo");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.sendCharId) {
     field.Name = "sendCharId";
     field.Type = TType.I32;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(SendCharId);
     oprot.WriteFieldEnd();
   }
   if (CharName != null && __isset.charName) {
     field.Name = "charName";
     field.Type = TType.String;
     field.ID = 20;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(CharName);
     oprot.WriteFieldEnd();
   }
   if (__isset.vipLevel) {
     field.Name = "vipLevel";
     field.Type = TType.Byte;
     field.ID = 30;
     oprot.WriteFieldBegin(field);
     oprot.WriteByte(VipLevel);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
開發者ID:sgyli7,項目名稱:ClientFrameWork,代碼行數:31,代碼來源:SendChatCharInfo.cs

示例8: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("LazyMap");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (KeysOnly != null && __isset.keysOnly) {
     field.Name = "keysOnly";
     field.Type = TType.Set;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteSetBegin(new TSet(TType.String, KeysOnly.Count));
       foreach (string _iter15 in KeysOnly)
       {
         oprot.WriteString(_iter15);
         oprot.WriteSetEnd();
       }
     }
     oprot.WriteFieldEnd();
   }
   if (FullMap != null && __isset.fullMap) {
     field.Name = "fullMap";
     field.Type = TType.Map;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.String, FullMap.Count));
       foreach (string _iter16 in FullMap.Keys)
       {
         oprot.WriteString(_iter16);
         oprot.WriteString(FullMap[_iter16]);
         oprot.WriteMapEnd();
       }
     }
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
開發者ID:Glympse,項目名稱:evernote-sdk-csharp,代碼行數:38,代碼來源:LazyMap.cs

示例9: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("FichaAtividadeColetivaThrift");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "uuidFicha";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(UuidFicha);
   oprot.WriteFieldEnd();
   if (OutraLocalidade != null && __isset.outraLocalidade) {
     field.Name = "outraLocalidade";
     field.Type = TType.String;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(OutraLocalidade);
     oprot.WriteFieldEnd();
   }
   if (__isset.inep) {
     field.Name = "inep";
     field.Type = TType.I64;
     field.ID = 7;
     oprot.WriteFieldBegin(field);
     oprot.WriteI64(Inep);
     oprot.WriteFieldEnd();
   }
   if (__isset.numParticipantes) {
     field.Name = "numParticipantes";
     field.Type = TType.I32;
     field.ID = 11;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(NumParticipantes);
     oprot.WriteFieldEnd();
   }
   if (__isset.numAvaliacoesAlteradas) {
     field.Name = "numAvaliacoesAlteradas";
     field.Type = TType.I32;
     field.ID = 12;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(NumAvaliacoesAlteradas);
     oprot.WriteFieldEnd();
   }
   if (Profissionais != null && __isset.profissionais) {
     field.Name = "profissionais";
     field.Type = TType.List;
     field.ID = 13;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.Struct, Profissionais.Count));
       foreach (ProfissionalCboRowItemThrift _iter18 in Profissionais)
       {
         _iter18.Write(oprot);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (__isset.atividadeTipo) {
     field.Name = "atividadeTipo";
     field.Type = TType.I64;
     field.ID = 14;
     oprot.WriteFieldBegin(field);
     oprot.WriteI64(AtividadeTipo);
     oprot.WriteFieldEnd();
   }
   if (TemasParaReuniao != null && __isset.temasParaReuniao) {
     field.Name = "temasParaReuniao";
     field.Type = TType.List;
     field.ID = 15;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.I64, TemasParaReuniao.Count));
       foreach (long _iter19 in TemasParaReuniao)
       {
         oprot.WriteI64(_iter19);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (PublicoAlvo != null && __isset.publicoAlvo) {
     field.Name = "publicoAlvo";
     field.Type = TType.List;
     field.ID = 16;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.I64, PublicoAlvo.Count));
       foreach (long _iter20 in PublicoAlvo)
       {
         oprot.WriteI64(_iter20);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (Participantes != null && __isset.participantes) {
     field.Name = "participantes";
     field.Type = TType.List;
     field.ID = 18;
     oprot.WriteFieldBegin(field);
//.........這裏部分代碼省略.........
開發者ID:esusab,項目名稱:integracao,代碼行數:101,代碼來源:FichaAtividadeColetivaThrift.cs

示例10: Write

 public void Write(TProtocol oprot)
 {
     TStruct struc = new TStruct("system_drop_column_family_args");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (Column_family != null && __isset.column_family) {
       field.Name = "column_family";
       field.Type = TType.String;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(Column_family);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
 }
開發者ID:razzmatazz,項目名稱:cassandra-sharp-client,代碼行數:16,代碼來源:Cassandra.cs

示例11: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("MutualFriend");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.userId) {
     field.Name = "userId";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(UserId);
     oprot.WriteFieldEnd();
   }
   if (TargetType != null && __isset.targetType) {
     field.Name = "targetType";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(TargetType);
     oprot.WriteFieldEnd();
   }
   if (TargetUser != null && __isset.targetUser) {
     field.Name = "targetUser";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(TargetUser);
     oprot.WriteFieldEnd();
   }
   if (__isset.pageIndex) {
     field.Name = "pageIndex";
     field.Type = TType.I32;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(PageIndex);
     oprot.WriteFieldEnd();
   }
   if (__isset.pageSize) {
     field.Name = "pageSize";
     field.Type = TType.I32;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(PageSize);
     oprot.WriteFieldEnd();
   }
   if (UserName != null && __isset.userName) {
     field.Name = "userName";
     field.Type = TType.String;
     field.ID = 6;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(UserName);
     oprot.WriteFieldEnd();
   }
   if (FirstName != null && __isset.firstName) {
     field.Name = "firstName";
     field.Type = TType.String;
     field.ID = 7;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(FirstName);
     oprot.WriteFieldEnd();
   }
   if (LastName != null && __isset.lastName) {
     field.Name = "lastName";
     field.Type = TType.String;
     field.ID = 8;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(LastName);
     oprot.WriteFieldEnd();
   }
   if (__isset.userTypeId) {
     field.Name = "userTypeId";
     field.Type = TType.I32;
     field.ID = 9;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(UserTypeId);
     oprot.WriteFieldEnd();
   }
   if (Picture != null && __isset.picture) {
     field.Name = "picture";
     field.Type = TType.String;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Picture);
     oprot.WriteFieldEnd();
   }
   if (Title != null && __isset.title) {
     field.Name = "title";
     field.Type = TType.String;
     field.ID = 11;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Title);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
開發者ID:tektak-abhisheksth,項目名稱:Web-API,代碼行數:95,代碼來源:MutualFriend.cs

示例12: Write

 public void Write(TProtocol oprot)
 {
     TStruct struc = new TStruct("GeteBayOrderRequest");
       oprot.WriteStructBegin(struc);
       TField field = new TField();
       if (EbayTokenID != null && __isset.EbayTokenID) {
     field.Name = "EbayTokenID";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(EbayTokenID);
     oprot.WriteFieldEnd();
       }
       if (__isset.SiteID) {
     field.Name = "SiteID";
     field.Type = TType.I32;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(SiteID);
     oprot.WriteFieldEnd();
       }
       if (OrderID != null && __isset.OrderID) {
     field.Name = "OrderID";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(OrderID);
     oprot.WriteFieldEnd();
       }
       if (ItemID != null && __isset.ItemID) {
     field.Name = "ItemID";
     field.Type = TType.String;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(ItemID);
     oprot.WriteFieldEnd();
       }
       if (TransactionID != null && __isset.TransactionID) {
     field.Name = "TransactionID";
     field.Type = TType.String;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(TransactionID);
     oprot.WriteFieldEnd();
       }
       oprot.WriteFieldStop();
       oprot.WriteStructEnd();
 }
開發者ID:tomochandv,項目名稱:Test,代碼行數:48,代碼來源:GeteBayOrderRequest.cs

示例13: Write

 public void Write(TProtocol oprot)
 {
     var struc = new TStruct("IOError");
     oprot.WriteStructBegin(struc);
     var field = new TField();
     if (this.Message != null && this.__isset.message)
     {
         field.Name = "message";
         field.Type = TType.String;
         field.ID = 1;
         oprot.WriteFieldBegin(field);
         oprot.WriteString(this.Message);
         oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
 }
開發者ID:nordbergm,項目名稱:HBaseNet,代碼行數:17,代碼來源:IOError.cs

示例14: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("NoteCollectionCounts");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (NotebookCounts != null && __isset.notebookCounts) {
     field.Name = "notebookCounts";
     field.Type = TType.Map;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.I32, NotebookCounts.Count));
       foreach (string _iter84 in NotebookCounts.Keys)
       {
         oprot.WriteString(_iter84);
         oprot.WriteI32(NotebookCounts[_iter84]);
         oprot.WriteMapEnd();
       }
     }
     oprot.WriteFieldEnd();
   }
   if (TagCounts != null && __isset.tagCounts) {
     field.Name = "tagCounts";
     field.Type = TType.Map;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.I32, TagCounts.Count));
       foreach (string _iter85 in TagCounts.Keys)
       {
         oprot.WriteString(_iter85);
         oprot.WriteI32(TagCounts[_iter85]);
         oprot.WriteMapEnd();
       }
     }
     oprot.WriteFieldEnd();
   }
   if (__isset.trashCount) {
     field.Name = "trashCount";
     field.Type = TType.I32;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(TrashCount);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
開發者ID:Glympse,項目名稱:evernote-sdk-csharp,代碼行數:47,代碼來源:NoteCollectionCounts.cs

示例15: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CfDef");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Keyspace != null && __isset.keyspace) {
     field.Name = "keyspace";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Keyspace);
     oprot.WriteFieldEnd();
   }
   if (Name != null && __isset.name) {
     field.Name = "name";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Name);
     oprot.WriteFieldEnd();
   }
   if (Column_type != null && __isset.column_type) {
     field.Name = "column_type";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Column_type);
     oprot.WriteFieldEnd();
   }
   if (Comparator_type != null && __isset.comparator_type) {
     field.Name = "comparator_type";
     field.Type = TType.String;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Comparator_type);
     oprot.WriteFieldEnd();
   }
   if (Subcomparator_type != null && __isset.subcomparator_type) {
     field.Name = "subcomparator_type";
     field.Type = TType.String;
     field.ID = 6;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Subcomparator_type);
     oprot.WriteFieldEnd();
   }
   if (Comment != null && __isset.comment) {
     field.Name = "comment";
     field.Type = TType.String;
     field.ID = 8;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Comment);
     oprot.WriteFieldEnd();
   }
   if (__isset.row_cache_size) {
     field.Name = "row_cache_size";
     field.Type = TType.Double;
     field.ID = 9;
     oprot.WriteFieldBegin(field);
     oprot.WriteDouble(Row_cache_size);
     oprot.WriteFieldEnd();
   }
   if (__isset.key_cache_size) {
     field.Name = "key_cache_size";
     field.Type = TType.Double;
     field.ID = 11;
     oprot.WriteFieldBegin(field);
     oprot.WriteDouble(Key_cache_size);
     oprot.WriteFieldEnd();
   }
   if (__isset.read_repair_chance) {
     field.Name = "read_repair_chance";
     field.Type = TType.Double;
     field.ID = 12;
     oprot.WriteFieldBegin(field);
     oprot.WriteDouble(Read_repair_chance);
     oprot.WriteFieldEnd();
   }
   if (Column_metadata != null && __isset.column_metadata) {
     field.Name = "column_metadata";
     field.Type = TType.List;
     field.ID = 13;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.Struct, Column_metadata.Count));
       foreach (ColumnDef _iter57 in Column_metadata)
       {
         _iter57.Write(oprot);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (__isset.gc_grace_seconds) {
     field.Name = "gc_grace_seconds";
     field.Type = TType.I32;
     field.ID = 14;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Gc_grace_seconds);
     oprot.WriteFieldEnd();
   }
   if (Default_validation_class != null && __isset.default_validation_class) {
//.........這裏部分代碼省略.........
開發者ID:Jacky1,項目名稱:cassandra-sharp,代碼行數:101,代碼來源:CfDef.cs


注:本文中的Thrift.Protocol.TProtocol.WriteString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。