Beispiel #1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("RuyiNetworkSettings");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Connection != null && __isset.connection)
         {
             field.Name = "connection";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             Connection.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (NetworkType != null && __isset.networkType)
         {
             field.Name = "networkType";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             NetworkType.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Quality != null && __isset.quality)
         {
             field.Name = "quality";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             Quality.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (SSID != null && __isset.SSID)
         {
             field.Name = "SSID";
             field.Type = TType.Struct;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             SSID.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (BSSID != null && __isset.BSSID)
         {
             field.Name = "BSSID";
             field.Type = TType.Struct;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             BSSID.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Authentication != null && __isset.Authentication)
         {
             field.Name = "Authentication";
             field.Type = TType.Struct;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             Authentication.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (DHCPEnabled != null && __isset.DHCPEnabled)
         {
             field.Name = "DHCPEnabled";
             field.Type = TType.Struct;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             DHCPEnabled.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (IpAddress != null && __isset.IpAddress)
         {
             field.Name = "IpAddress";
             field.Type = TType.Struct;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             IpAddress.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (SubMask != null && __isset.SubMask)
         {
             field.Name = "SubMask";
             field.Type = TType.Struct;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             SubMask.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Gateway != null && __isset.Gateway)
         {
             field.Name = "Gateway";
             field.Type = TType.Struct;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             Gateway.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (MainDNS != null && __isset.MainDNS)
         {
             field.Name = "MainDNS";
             field.Type = TType.Struct;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             MainDNS.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (SubDNS != null && __isset.SubDNS)
         {
             field.Name = "SubDNS";
             field.Type = TType.Struct;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             SubDNS.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (MacAddress != null && __isset.MacAddress)
         {
             field.Name = "MacAddress";
             field.Type = TType.Struct;
             field.ID   = 13;
             oprot.WriteFieldBegin(field);
             MacAddress.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Proxy != null && __isset.Proxy)
         {
             field.Name = "Proxy";
             field.Type = TType.Struct;
             field.ID   = 14;
             oprot.WriteFieldBegin(field);
             Proxy.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }