本文整理汇总了C#中FluentCassandra.Thrift.Protocol.TProtocol.WriteBinary方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.WriteBinary方法的具体用法?C# TProtocol.WriteBinary怎么用?C# TProtocol.WriteBinary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FluentCassandra.Thrift.Protocol.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteBinary方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("KeyCount");
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 = "count";
field.Type = TType.I32;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Count);
oprot.WriteFieldEnd();
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例2: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CounterColumn");
oprot.WriteStructBegin(struc);
TField field = new TField();
field.Name = "name";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(Name);
oprot.WriteFieldEnd();
field.Name = "value";
field.Type = TType.I64;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteI64(Value);
oprot.WriteFieldEnd();
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例3: 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();
}
示例4: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("batch_mutate_args");
oprot.WriteStructBegin(struc);
TField field = new TField();
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[] _iter165 in Mutation_map.Keys)
{
oprot.WriteBinary(_iter165);
{
oprot.WriteMapBegin(new TMap(TType.String, TType.List, Mutation_map[_iter165].Count));
foreach (string _iter166 in Mutation_map[_iter165].Keys)
{
oprot.WriteString(_iter166);
{
oprot.WriteListBegin(new TList(TType.Struct, Mutation_map[_iter165][_iter166].Count));
foreach (Mutation _iter167 in Mutation_map[_iter165][_iter166])
{
_iter167.Write(oprot);
}
oprot.WriteListEnd();
}
}
oprot.WriteMapEnd();
}
}
oprot.WriteMapEnd();
}
oprot.WriteFieldEnd();
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();
}
示例5: 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();
}
示例6: Write
//.........这里部分代码省略.........
oprot.WriteFieldBegin(field);
oprot.WriteBool(Replicate_on_write);
oprot.WriteFieldEnd();
}
if (__isset.merge_shards_chance) {
field.Name = "merge_shards_chance";
field.Type = TType.Double;
field.ID = 25;
oprot.WriteFieldBegin(field);
oprot.WriteDouble(Merge_shards_chance);
oprot.WriteFieldEnd();
}
if (Key_validation_class != null && __isset.key_validation_class) {
field.Name = "key_validation_class";
field.Type = TType.String;
field.ID = 26;
oprot.WriteFieldBegin(field);
oprot.WriteString(Key_validation_class);
oprot.WriteFieldEnd();
}
if (Row_cache_provider != null && __isset.row_cache_provider) {
field.Name = "row_cache_provider";
field.Type = TType.String;
field.ID = 27;
oprot.WriteFieldBegin(field);
oprot.WriteString(Row_cache_provider);
oprot.WriteFieldEnd();
}
if (Key_alias != null && __isset.key_alias) {
field.Name = "key_alias";
field.Type = TType.String;
field.ID = 28;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(Key_alias);
oprot.WriteFieldEnd();
}
if (Compaction_strategy != null && __isset.compaction_strategy) {
field.Name = "compaction_strategy";
field.Type = TType.String;
field.ID = 29;
oprot.WriteFieldBegin(field);
oprot.WriteString(Compaction_strategy);
oprot.WriteFieldEnd();
}
if (Compaction_strategy_options != null && __isset.compaction_strategy_options) {
field.Name = "compaction_strategy_options";
field.Type = TType.Map;
field.ID = 30;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.String, TType.String, Compaction_strategy_options.Count));
foreach (string _iter58 in Compaction_strategy_options.Keys)
{
oprot.WriteString(_iter58);
oprot.WriteString(Compaction_strategy_options[_iter58]);
}
oprot.WriteMapEnd();
}
oprot.WriteFieldEnd();
}
if (__isset.row_cache_keys_to_save) {
field.Name = "row_cache_keys_to_save";
field.Type = TType.I32;
field.ID = 31;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Row_cache_keys_to_save);
示例7: 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();
}
示例8: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CqlRow");
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 = "columns";
field.Type = TType.List;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, Columns.Count));
foreach (Column _iter85 in Columns)
{
_iter85.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例9: 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();
}
示例10: 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();
}
示例11: 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();
}
示例12: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CounterSuperColumn");
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 (Columns != null && __isset.columns) {
field.Name = "columns";
field.Type = TType.List;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, Columns.Count));
foreach (CounterColumn _iter7 in Columns)
{
_iter7.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例13: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("Deletion");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.timestamp) {
field.Name = "timestamp";
field.Type = TType.I64;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI64(Timestamp);
oprot.WriteFieldEnd();
}
if (Super_column != null && __isset.super_column) {
field.Name = "super_column";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(Super_column);
oprot.WriteFieldEnd();
}
if (Predicate != null && __isset.predicate) {
field.Name = "predicate";
field.Type = TType.Struct;
field.ID = 3;
oprot.WriteFieldBegin(field);
Predicate.Write(oprot);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例14: 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();
}
示例15: 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();
}