當前位置: 首頁>>代碼示例>>C#>>正文


C# TProtocol.WriteSetBegin方法代碼示例

本文整理匯總了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();
 }
開發者ID:Glympse,項目名稱:evernote-sdk-csharp,代碼行數:38,代碼來源:LazyMap.cs

示例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();
 }
開發者ID:bcardi,項目名稱:storm-net-adapter,代碼行數:26,代碼來源:NodeInfo.cs

示例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();
 }
開發者ID:Banandana,項目名稱:LineSharp,代碼行數:22,代碼來源:TalkService.cs

示例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)
//.........這裏部分代碼省略.........
開發者ID:wsycarlos,項目名稱:ARIA,代碼行數:101,代碼來源:BaseMsg.cs

示例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();
    }
開發者ID:shentianyi,項目名稱:ifDataHouse,代碼行數:33,代碼來源:Datahouse.cs

示例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();
            }
開發者ID:ehornbostel,項目名稱:hectorsharp,代碼行數:26,代碼來源:Cassandra.cs


注:本文中的Thrift.Protocol.TProtocol.WriteSetBegin方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。