本文整理汇总了C#中Thrift.Protocol.TProtocol.WriteSetBegin方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.WriteSetBegin方法的具体用法?C# TProtocol.WriteSetBegin怎么用?C# TProtocol.WriteSetBegin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thrift.Protocol.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteSetBegin方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
示例2: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("NodeInfo");
oprot.WriteStructBegin(struc);
TField field = new TField();
field.Name = "node";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteString(Node);
oprot.WriteFieldEnd();
field.Name = "port";
field.Type = TType.Set;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteSetBegin(new TSet(TType.I64, Port.Count));
foreach (long _iter184 in Port)
{
oprot.WriteI64(_iter184);
}
oprot.WriteSetEnd();
}
oprot.WriteFieldEnd();
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例3: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("findContactsByPhone_args");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Phones != null && __isset.phones) {
field.Name = "phones";
field.Type = TType.Set;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteSetBegin(new TSet(TType.String, Phones.Count));
foreach (string _iter216 in Phones)
{
oprot.WriteString(_iter216);
}
oprot.WriteSetEnd();
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例4: Write
public void Write(TProtocol oprot) {
oprot.IncrementRecursionDepth();
try
{
TStruct struc = new TStruct("BaseMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
field.Name = "msgType";
field.Type = TType.I32;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI32((int)MsgType);
oprot.WriteFieldEnd();
if (__isset.boolVal) {
field.Name = "boolVal";
field.Type = TType.Bool;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteBool(BoolVal);
oprot.WriteFieldEnd();
}
if (__isset.byteVal) {
field.Name = "byteVal";
field.Type = TType.Byte;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteByte(ByteVal);
oprot.WriteFieldEnd();
}
if (__isset.intVal) {
field.Name = "intVal";
field.Type = TType.I32;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteI32(IntVal);
oprot.WriteFieldEnd();
}
if (__isset.doubleVal) {
field.Name = "doubleVal";
field.Type = TType.Double;
field.ID = 5;
oprot.WriteFieldBegin(field);
oprot.WriteDouble(DoubleVal);
oprot.WriteFieldEnd();
}
if (StrVal != null && __isset.strVal) {
field.Name = "strVal";
field.Type = TType.String;
field.ID = 6;
oprot.WriteFieldBegin(field);
oprot.WriteString(StrVal);
oprot.WriteFieldEnd();
}
if (ByteArrVal != null && __isset.byteArrVal) {
field.Name = "byteArrVal";
field.Type = TType.String;
field.ID = 7;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(ByteArrVal);
oprot.WriteFieldEnd();
}
if (MapVal != null && __isset.mapVal) {
field.Name = "mapVal";
field.Type = TType.Map;
field.ID = 8;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.Struct, TType.Struct, MapVal.Count));
foreach (BaseMsg _iter10 in MapVal.Keys)
{
_iter10.Write(oprot);
MapVal[_iter10].Write(oprot);
}
oprot.WriteMapEnd();
}
oprot.WriteFieldEnd();
}
if (ListVal != null && __isset.listVal) {
field.Name = "listVal";
field.Type = TType.List;
field.ID = 9;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, ListVal.Count));
foreach (BaseMsg _iter11 in ListVal)
{
_iter11.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
if (SetVal != null && __isset.setVal) {
field.Name = "setVal";
field.Type = TType.Set;
field.ID = 10;
oprot.WriteFieldBegin(field);
{
oprot.WriteSetBegin(new TSet(TType.Struct, SetVal.Count));
foreach (BaseMsg _iter12 in SetVal)
//.........这里部分代码省略.........
示例5: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("getProductOutputNumAndTime_result");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (this.__isset.success) {
if (Success != null) {
field.Name = "Success";
field.Type = TType.Set;
field.ID = 0;
oprot.WriteFieldBegin(field);
{
oprot.WriteSetBegin(new TSet(TType.Map, Success.Count));
foreach (Dictionary<string, string> _iter111 in Success)
{
{
oprot.WriteMapBegin(new TMap(TType.String, TType.String, _iter111.Count));
foreach (string _iter112 in _iter111.Keys)
{
oprot.WriteString(_iter112);
oprot.WriteString(_iter111[_iter112]);
}
oprot.WriteMapEnd();
}
}
oprot.WriteSetEnd();
}
oprot.WriteFieldEnd();
}
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例6: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("describe_keyspaces_result");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (this.__isset.success) {
if (this.success != null) {
field.Name = "success";
field.Type = TType.Set;
field.ID = 0;
oprot.WriteFieldBegin(field);
{
oprot.WriteSetBegin(new TSet(TType.String, this.success.Count));
foreach (string _iter85 in this.success)
{
oprot.WriteString(_iter85);
oprot.WriteSetEnd();
}
}
oprot.WriteFieldEnd();
}
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}