本文整理汇总了C#中Thrift.Protocol.TProtocol.WriteBinary方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.WriteBinary方法的具体用法?C# TProtocol.WriteBinary怎么用?C# TProtocol.WriteBinary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thrift.Protocol.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteBinary方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("QueueRequest");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Data != null && __isset.data) {
field.Name = "data";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(Data);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例2: Write
public void Write(TProtocol oprot)
{
var struc = new TStruct("get_args");
oprot.WriteStructBegin(struc);
var field = new TField();
if (this.TableName != null && this.__isset.tableName)
{
field.Name = "tableName";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(this.TableName);
oprot.WriteFieldEnd();
}
if (this.Row != null && this.__isset.row)
{
field.Name = "row";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(this.Row);
oprot.WriteFieldEnd();
}
if (this.Column != null && this.__isset.column)
{
field.Name = "column";
field.Type = TType.String;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(this.Column);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例3: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("CounterColumn");
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 (__isset.value) {
field.Name = "value";
field.Type = TType.I64;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteI64(Value);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例4: 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);
示例5: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("multiget_slice_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.List, Success.Count));
foreach (byte[] _iter98 in Success.Keys)
{
oprot.WriteBinary(_iter98);
{
oprot.WriteListBegin(new TList(TType.Struct, Success[_iter98].Count));
foreach (ColumnOrSuperColumn _iter99 in Success[_iter98])
{
_iter99.Write(oprot);
}
oprot.WriteListEnd();
}
}
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();
}
} else if (this.__isset.ue) {
if (Ue != null) {
field.Name = "Ue";
field.Type = TType.Struct;
field.ID = 2;
oprot.WriteFieldBegin(field);
Ue.Write(oprot);
oprot.WriteFieldEnd();
}
} else if (this.__isset.te) {
if (Te != null) {
field.Name = "Te";
field.Type = TType.Struct;
field.ID = 3;
oprot.WriteFieldBegin(field);
Te.Write(oprot);
oprot.WriteFieldEnd();
}
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例6: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("IndexClause");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (this.expressions != null && __isset.expressions) {
field.Name = "expressions";
field.Type = TType.List;
field.ID = 1;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, this.expressions.Count));
foreach (IndexExpression _iter11 in this.expressions)
{
_iter11.Write(oprot);
oprot.WriteListEnd();
}
}
oprot.WriteFieldEnd();
}
if (this.start_key != null && __isset.start_key) {
field.Name = "start_key";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(this.start_key);
oprot.WriteFieldEnd();
}
if (__isset.count) {
field.Name = "count";
field.Type = TType.I32;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteI32(this.count);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例7: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("ComponentObject");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Serialized_java != null && __isset.serialized_java) {
field.Name = "serialized_java";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(Serialized_java);
oprot.WriteFieldEnd();
}
if (Shell != null && __isset.shell) {
field.Name = "shell";
field.Type = TType.Struct;
field.ID = 2;
oprot.WriteFieldBegin(field);
Shell.Write(oprot);
oprot.WriteFieldEnd();
}
if (Java_object != null && __isset.java_object) {
field.Name = "java_object";
field.Type = TType.Struct;
field.ID = 3;
oprot.WriteFieldBegin(field);
Java_object.Write(oprot);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例8: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("TPut");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Row != null && __isset.row) {
field.Name = "row";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(Row);
oprot.WriteFieldEnd();
}
if (ColumnValues != null && __isset.columnValues) {
field.Name = "columnValues";
field.Type = TType.List;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, ColumnValues.Count));
foreach (TColumnValue _iter11 in ColumnValues)
{
_iter11.Write(oprot);
}
oprot.WriteListEnd();
}
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.writeToWal) {
field.Name = "writeToWal";
field.Type = TType.Bool;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteBool(WriteToWal);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例9: Write
public void Write(TProtocol oprot)
{
var struc = new TStruct("RestResponse");
oprot.WriteStructBegin(struc);
var field = new TField();
if (__isset.status)
{
field.Name = "status";
field.Type = TType.I32;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI32((int) status);
oprot.WriteFieldEnd();
}
if (headers != null && __isset.headers)
{
field.Name = "headers";
field.Type = TType.Map;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.String, TType.String, headers.Count));
foreach (string _iter14 in headers.Keys)
{
oprot.WriteString(_iter14);
oprot.WriteString(headers[_iter14]);
oprot.WriteMapEnd();
}
}
oprot.WriteFieldEnd();
}
if (body != null && __isset.body)
{
field.Name = "body";
field.Type = TType.String;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(body);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例10: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("ColumnParent");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (this.column_family != null && __isset.column_family) {
field.Name = "column_family";
field.Type = TType.String;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteString(this.column_family);
oprot.WriteFieldEnd();
}
if (this.super_column != null && __isset.super_column) {
field.Name = "super_column";
field.Type = TType.String;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(this.super_column);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例11: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("ColumnDef");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (this.name != null && __isset.name) {
field.Name = "name";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(this.name);
oprot.WriteFieldEnd();
}
if (this.validation_class != null && __isset.validation_class) {
field.Name = "validation_class";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(this.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)this.index_type);
oprot.WriteFieldEnd();
}
if (this.index_name != null && __isset.index_name) {
field.Name = "index_name";
field.Type = TType.String;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteString(this.index_name);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例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();
}
示例13: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("TRowResult");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Row != null && __isset.row) {
field.Name = "row";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(Row);
oprot.WriteFieldEnd();
}
if (Columns != null && __isset.columns) {
field.Name = "columns";
field.Type = TType.Map;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.String, TType.Struct, Columns.Count));
foreach (byte[] _iter8 in Columns.Keys)
{
oprot.WriteBinary(_iter8);
Columns[_iter8].Write(oprot);
oprot.WriteMapEnd();
}
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例14: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("Message");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (From != null && __isset.from) {
field.Name = "from";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteString(From);
oprot.WriteFieldEnd();
}
if (To != null && __isset.to) {
field.Name = "to";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(To);
oprot.WriteFieldEnd();
}
if (__isset.toType) {
field.Name = "toType";
field.Type = TType.I32;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteI32((int)ToType);
oprot.WriteFieldEnd();
}
if (Id != null && __isset.id) {
field.Name = "id";
field.Type = TType.String;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteString(Id);
oprot.WriteFieldEnd();
}
if (__isset.createdTime) {
field.Name = "createdTime";
field.Type = TType.I64;
field.ID = 5;
oprot.WriteFieldBegin(field);
oprot.WriteI64(CreatedTime);
oprot.WriteFieldEnd();
}
if (__isset.deliveredTime) {
field.Name = "deliveredTime";
field.Type = TType.I64;
field.ID = 6;
oprot.WriteFieldBegin(field);
oprot.WriteI64(DeliveredTime);
oprot.WriteFieldEnd();
}
if (Text != null && __isset.text) {
field.Name = "text";
field.Type = TType.String;
field.ID = 10;
oprot.WriteFieldBegin(field);
oprot.WriteString(Text);
oprot.WriteFieldEnd();
}
if (Location != null && __isset.location) {
field.Name = "location";
field.Type = TType.Struct;
field.ID = 11;
oprot.WriteFieldBegin(field);
Location.Write(oprot);
oprot.WriteFieldEnd();
}
if (__isset.hasContent) {
field.Name = "hasContent";
field.Type = TType.Bool;
field.ID = 14;
oprot.WriteFieldBegin(field);
oprot.WriteBool(HasContent);
oprot.WriteFieldEnd();
}
if (__isset.contentType) {
field.Name = "contentType";
field.Type = TType.I32;
field.ID = 15;
oprot.WriteFieldBegin(field);
oprot.WriteI32((int)ContentType);
oprot.WriteFieldEnd();
}
if (ContentPreview != null && __isset.contentPreview) {
field.Name = "contentPreview";
field.Type = TType.String;
field.ID = 17;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(ContentPreview);
oprot.WriteFieldEnd();
}
if (ContentMetadata != null && __isset.contentMetadata) {
field.Name = "contentMetadata";
field.Type = TType.Map;
field.ID = 18;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.String, TType.String, ContentMetadata.Count));
foreach (string _iter28 in ContentMetadata.Keys)
//.........这里部分代码省略.........
示例15: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("BatchMutation");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Row != null && __isset.row) {
field.Name = "row";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(Row);
oprot.WriteFieldEnd();
}
if (Mutations != null && __isset.mutations) {
field.Name = "mutations";
field.Type = TType.List;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, Mutations.Count));
foreach (Mutation _iter3 in Mutations)
{
_iter3.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}