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


C# TProtocol.WriteString方法代码示例

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


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

示例1: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("AuthenticationException");
   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:achinn,项目名称:fluentcassandra,代码行数:13,代码来源:AuthenticationException.cs

示例2: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("AuthorizationException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Why != null && __isset.why) {
     field.Name = "why";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Why);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:15,代码来源:AuthorizationException.cs

示例3: Write

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("describe_token_map_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Map;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            {
              oprot.WriteMapBegin(new TMap(TType.String, TType.String, Success.Count));
              foreach (string _iter207 in Success.Keys)
              {
                oprot.WriteString(_iter207);
                oprot.WriteString(Success[_iter207]);
              }
              oprot.WriteMapEnd();
            }
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.ire) {
          if (Ire != null) {
            field.Name = "Ire";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            Ire.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:35,代码来源:Cassandra.cs

示例4: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("ColumnPath");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Column_family != null && __isset.column_family) {
     field.Name = "column_family";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Column_family);
     oprot.WriteFieldEnd();
   }
   if (Super_column != null && __isset.super_column) {
     field.Name = "super_column";
     field.Type = TType.String;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Super_column);
     oprot.WriteFieldEnd();
   }
   if (Column != null && __isset.column) {
     field.Name = "column";
     field.Type = TType.String;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Column);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:31,代码来源:ColumnPath.cs

示例5: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("TriggerDef");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "name";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Name);
   oprot.WriteFieldEnd();
   field.Name = "options";
   field.Type = TType.Map;
   field.ID = 2;
   oprot.WriteFieldBegin(field);
   {
     oprot.WriteMapBegin(new TMap(TType.String, TType.String, Options.Count));
     foreach (string _iter54 in Options.Keys)
     {
       oprot.WriteString(_iter54);
       oprot.WriteString(Options[_iter54]);
     }
     oprot.WriteMapEnd();
   }
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:27,代码来源:TriggerDef.cs

示例6: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("ColumnDef");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Name != null && __isset.name) {
     field.Name = "name";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Name);
     oprot.WriteFieldEnd();
   }
   if (Validation_class != null && __isset.validation_class) {
     field.Name = "validation_class";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Validation_class);
     oprot.WriteFieldEnd();
   }
   if (__isset.index_type) {
     field.Name = "index_type";
     field.Type = TType.I32;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)Index_type);
     oprot.WriteFieldEnd();
   }
   if (Index_name != null && __isset.index_name) {
     field.Name = "index_name";
     field.Type = TType.String;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Index_name);
     oprot.WriteFieldEnd();
   }
   if (Index_options != null && __isset.index_options) {
     field.Name = "index_options";
     field.Type = TType.Map;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.String, Index_options.Count));
       foreach (string _iter45 in Index_options.Keys)
       {
         oprot.WriteString(_iter45);
         oprot.WriteString(Index_options[_iter45]);
       }
       oprot.WriteMapEnd();
     }
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:55,代码来源:ColumnDef.cs

示例7: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("atomic_batch_mutate_args");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Mutation_map != null && __isset.mutation_map) {
     field.Name = "mutation_map";
     field.Type = TType.Map;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.Map, Mutation_map.Count));
       foreach (byte[] _iter158 in Mutation_map.Keys)
       {
         oprot.WriteBinary(_iter158);
         {
           oprot.WriteMapBegin(new TMap(TType.String, TType.List, Mutation_map[_iter158].Count));
           foreach (string _iter159 in Mutation_map[_iter158].Keys)
           {
             oprot.WriteString(_iter159);
             {
               oprot.WriteListBegin(new TList(TType.Struct, Mutation_map[_iter158][_iter159].Count));
               foreach (Mutation _iter160 in Mutation_map[_iter158][_iter159])
               {
                 _iter160.Write(oprot);
               }
               oprot.WriteListEnd();
             }
           }
           oprot.WriteMapEnd();
         }
       }
       oprot.WriteMapEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (__isset.consistency_level) {
     field.Name = "consistency_level";
     field.Type = TType.I32;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)Consistency_level);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:46,代码来源:Cassandra.cs

示例8: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("EndpointDetails");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Host != null && __isset.host) {
     field.Name = "host";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Host);
     oprot.WriteFieldEnd();
   }
   if (Datacenter != null && __isset.datacenter) {
     field.Name = "datacenter";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Datacenter);
     oprot.WriteFieldEnd();
   }
   if (Rack != null && __isset.rack) {
     field.Name = "rack";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Rack);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:31,代码来源:EndpointDetails.cs

示例9: 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:nathannis,项目名称:fluentcassandra,代码行数:101,代码来源:CfDef.cs

示例10: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("KsDef");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Name != null && __isset.name) {
     field.Name = "name";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Name);
     oprot.WriteFieldEnd();
   }
   if (Strategy_class != null && __isset.strategy_class) {
     field.Name = "strategy_class";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Strategy_class);
     oprot.WriteFieldEnd();
   }
   if (Strategy_options != null && __isset.strategy_options) {
     field.Name = "strategy_options";
     field.Type = TType.Map;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.String, Strategy_options.Count));
       foreach (string _iter67 in Strategy_options.Keys)
       {
         oprot.WriteString(_iter67);
         oprot.WriteString(Strategy_options[_iter67]);
       }
       oprot.WriteMapEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (__isset.replication_factor) {
     field.Name = "replication_factor";
     field.Type = TType.I32;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Replication_factor);
     oprot.WriteFieldEnd();
   }
   if (Cf_defs != null && __isset.cf_defs) {
     field.Name = "cf_defs";
     field.Type = TType.List;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.Struct, Cf_defs.Count));
       foreach (CfDef _iter68 in Cf_defs)
       {
         _iter68.Write(oprot);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (__isset.durable_writes) {
     field.Name = "durable_writes";
     field.Type = TType.Bool;
     field.ID = 6;
     oprot.WriteFieldBegin(field);
     oprot.WriteBool(Durable_writes);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:70,代码来源:KsDef.cs

示例11: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CqlMetadata");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Name_types != null && __isset.name_types) {
     field.Name = "name_types";
     field.Type = TType.Map;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.String, Name_types.Count));
       foreach (byte[] _iter81 in Name_types.Keys)
       {
         oprot.WriteBinary(_iter81);
         oprot.WriteString(Name_types[_iter81]);
       }
       oprot.WriteMapEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (Value_types != null && __isset.value_types) {
     field.Name = "value_types";
     field.Type = TType.Map;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteMapBegin(new TMap(TType.String, TType.String, Value_types.Count));
       foreach (byte[] _iter82 in Value_types.Keys)
       {
         oprot.WriteBinary(_iter82);
         oprot.WriteString(Value_types[_iter82]);
       }
       oprot.WriteMapEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (Default_name_type != null && __isset.default_name_type) {
     field.Name = "default_name_type";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Default_name_type);
     oprot.WriteFieldEnd();
   }
   if (Default_value_type != null && __isset.default_value_type) {
     field.Name = "default_value_type";
     field.Type = TType.String;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Default_value_type);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:55,代码来源:CqlMetadata.cs

示例12: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("TokenRange");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Start_token != null && __isset.start_token) {
     field.Name = "start_token";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Start_token);
     oprot.WriteFieldEnd();
   }
   if (End_token != null && __isset.end_token) {
     field.Name = "end_token";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(End_token);
     oprot.WriteFieldEnd();
   }
   if (Endpoints != null && __isset.endpoints) {
     field.Name = "endpoints";
     field.Type = TType.List;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.String, Endpoints.Count));
       foreach (string _iter33 in Endpoints)
       {
         oprot.WriteString(_iter33);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (Rpc_endpoints != null && __isset.rpc_endpoints) {
     field.Name = "rpc_endpoints";
     field.Type = TType.List;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.String, Rpc_endpoints.Count));
       foreach (string _iter34 in Rpc_endpoints)
       {
         oprot.WriteString(_iter34);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (Endpoint_details != null && __isset.endpoint_details) {
     field.Name = "endpoint_details";
     field.Type = TType.List;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.Struct, Endpoint_details.Count));
       foreach (EndpointDetails _iter35 in Endpoint_details)
       {
         _iter35.Write(oprot);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:68,代码来源:TokenRange.cs

示例13: Write

		public void Write(TProtocol oprot)
		{
			TStruct struc = new TStruct("TApplicationException");
			TField field = new TField();

			oprot.WriteStructBegin(struc);

			if (!String.IsNullOrEmpty(Message))
			{
				field.Name = "message";
				field.Type = TType.String;
				field.ID = 1;
				oprot.WriteFieldBegin(field);
				oprot.WriteString(Message);
				oprot.WriteFieldEnd();
			}

			field.Name = "type";
			field.Type = TType.I32;
			field.ID = 2;
			oprot.WriteFieldBegin(field);
			oprot.WriteI32((int)type);
			oprot.WriteFieldEnd();
			oprot.WriteFieldStop();
			oprot.WriteStructEnd();
		}
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:26,代码来源:TApplicationException.cs

示例14: 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 _iter40 in Credentials.Keys)
       {
         oprot.WriteString(_iter40);
         oprot.WriteString(Credentials[_iter40]);
       }
       oprot.WriteMapEnd();
     }
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:23,代码来源:AuthenticationRequest.cs

示例15: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CfSplit");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "start_token";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Start_token);
   oprot.WriteFieldEnd();
   field.Name = "end_token";
   field.Type = TType.String;
   field.ID = 2;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(End_token);
   oprot.WriteFieldEnd();
   field.Name = "row_count";
   field.Type = TType.I64;
   field.ID = 3;
   oprot.WriteFieldBegin(field);
   oprot.WriteI64(Row_count);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:25,代码来源:CfSplit.cs


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