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


C# TProtocol.WriteI32方法代码示例

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


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

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

示例2: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("remove_args");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "key";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteBinary(Key);
   oprot.WriteFieldEnd();
   field.Name = "column_path";
   field.Type = TType.Struct;
   field.ID = 2;
   oprot.WriteFieldBegin(field);
   Column_path.Write(oprot);
   oprot.WriteFieldEnd();
   field.Name = "timestamp";
   field.Type = TType.I64;
   field.ID = 3;
   oprot.WriteFieldBegin(field);
   oprot.WriteI64(Timestamp);
   oprot.WriteFieldEnd();
   if (__isset.consistency_level) {
     field.Name = "consistency_level";
     field.Type = TType.I32;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)Consistency_level);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:33,代码来源:Cassandra.cs

示例3: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("execute_cql3_query_args");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Query != null && __isset.query) {
     field.Name = "query";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Query);
     oprot.WriteFieldEnd();
   }
   if (__isset.compression) {
     field.Name = "compression";
     field.Type = TType.I32;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)Compression);
     oprot.WriteFieldEnd();
   }
   if (__isset.consistency) {
     field.Name = "consistency";
     field.Type = TType.I32;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)Consistency);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:31,代码来源:Cassandra.cs

示例4: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("IndexClause");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Expressions != null && __isset.expressions) {
     field.Name = "expressions";
     field.Type = TType.List;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.Struct, Expressions.Count));
       foreach (IndexExpression _iter15 in Expressions)
       {
         _iter15.Write(oprot);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (Start_key != null && __isset.start_key) {
     field.Name = "start_key";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Start_key);
     oprot.WriteFieldEnd();
   }
   if (__isset.count) {
     field.Name = "count";
     field.Type = TType.I32;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Count);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:38,代码来源:IndexClause.cs

示例5: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SliceRange");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "start";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteBinary(Start);
   oprot.WriteFieldEnd();
   field.Name = "finish";
   field.Type = TType.String;
   field.ID = 2;
   oprot.WriteFieldBegin(field);
   oprot.WriteBinary(Finish);
   oprot.WriteFieldEnd();
   field.Name = "reversed";
   field.Type = TType.Bool;
   field.ID = 3;
   oprot.WriteFieldBegin(field);
   oprot.WriteBool(Reversed);
   oprot.WriteFieldEnd();
   field.Name = "count";
   field.Type = TType.I32;
   field.ID = 4;
   oprot.WriteFieldBegin(field);
   oprot.WriteI32(Count);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:31,代码来源:SliceRange.cs

示例6: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("KeyCount");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Key != null && __isset.key) {
     field.Name = "key";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Key);
     oprot.WriteFieldEnd();
   }
   if (__isset.count) {
     field.Name = "count";
     field.Type = TType.I32;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Count);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:23,代码来源:KeyCount.cs

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

示例8: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("IndexExpression");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Column_name != null && __isset.column_name) {
     field.Name = "column_name";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Column_name);
     oprot.WriteFieldEnd();
   }
   if (__isset.op) {
     field.Name = "op";
     field.Type = TType.I32;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)Op);
     oprot.WriteFieldEnd();
   }
   if (Value != null && __isset.value) {
     field.Name = "value";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Value);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:31,代码来源:IndexExpression.cs

示例9: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CqlResult");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.type) {
     field.Name = "type";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)Type);
     oprot.WriteFieldEnd();
   }
   if (Rows != null && __isset.rows) {
     field.Name = "rows";
     field.Type = TType.List;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.Struct, Rows.Count));
       foreach (CqlRow _iter86 in Rows)
       {
         _iter86.Write(oprot);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (__isset.num) {
     field.Name = "num";
     field.Type = TType.I32;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Num);
     oprot.WriteFieldEnd();
   }
   if (Schema != null && __isset.schema) {
     field.Name = "schema";
     field.Type = TType.Struct;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     Schema.Write(oprot);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:46,代码来源:CqlResult.cs

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

示例11: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("Column");
   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 (Value != null && __isset.value) {
     field.Name = "value";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Value);
     oprot.WriteFieldEnd();
   }
   if (__isset.timestamp) {
     field.Name = "timestamp";
     field.Type = TType.I64;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteI64(Timestamp);
     oprot.WriteFieldEnd();
   }
   if (__isset.ttl) {
     field.Name = "ttl";
     field.Type = TType.I32;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Ttl);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:39,代码来源:Column.cs

示例12: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("KeyRange");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Start_key != null && __isset.start_key) {
     field.Name = "start_key";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Start_key);
     oprot.WriteFieldEnd();
   }
   if (End_key != null && __isset.end_key) {
     field.Name = "end_key";
     field.Type = TType.String;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(End_key);
     oprot.WriteFieldEnd();
   }
   if (Start_token != null && __isset.start_token) {
     field.Name = "start_token";
     field.Type = TType.String;
     field.ID = 3;
     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 = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(End_token);
     oprot.WriteFieldEnd();
   }
   if (__isset.count) {
     field.Name = "count";
     field.Type = TType.I32;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Count);
     oprot.WriteFieldEnd();
   }
   if (Row_filter != null && __isset.row_filter) {
     field.Name = "row_filter";
     field.Type = TType.List;
     field.ID = 6;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.Struct, Row_filter.Count));
       foreach (IndexExpression _iter19 in Row_filter)
       {
         _iter19.Write(oprot);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:62,代码来源:KeyRange.cs

示例13: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CqlPreparedResult");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.itemId) {
     field.Name = "itemId";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(ItemId);
     oprot.WriteFieldEnd();
   }
   if (__isset.count) {
     field.Name = "count";
     field.Type = TType.I32;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Count);
     oprot.WriteFieldEnd();
   }
   if (Variable_types != null && __isset.variable_types) {
     field.Name = "variable_types";
     field.Type = TType.List;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.String, Variable_types.Count));
       foreach (string _iter93 in Variable_types)
       {
         oprot.WriteString(_iter93);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (Variable_names != null && __isset.variable_names) {
     field.Name = "variable_names";
     field.Type = TType.List;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.String, Variable_names.Count));
       foreach (string _iter94 in Variable_names)
       {
         oprot.WriteString(_iter94);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:53,代码来源:CqlPreparedResult.cs

示例14: Write

 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("TimedOutException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.acknowledged_by) {
     field.Name = "acknowledged_by";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Acknowledged_by);
     oprot.WriteFieldEnd();
   }
   if (__isset.acknowledged_by_batchlog) {
     field.Name = "acknowledged_by_batchlog";
     field.Type = TType.Bool;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteBool(Acknowledged_by_batchlog);
     oprot.WriteFieldEnd();
   }
   if (__isset.paxos_in_progress) {
     field.Name = "paxos_in_progress";
     field.Type = TType.Bool;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteBool(Paxos_in_progress);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:31,代码来源:TimedOutException.cs


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