本文整理汇总了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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
//.........这里部分代码省略.........
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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) {
//.........这里部分代码省略.........