Пример #1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIArgumentationElementUnion");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (ArgumentGroup != null && __isset.ArgumentGroup)
         {
             field.Name = "ArgumentGroup";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             ArgumentGroup.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ArgumentPackage != null && __isset.ArgumentPackage)
         {
             field.Name = "ArgumentPackage";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             ArgumentPackage.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ArgumentAsset != null && __isset.ArgumentAsset)
         {
             field.Name = "ArgumentAsset";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             ArgumentAsset.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIArgumentPackageUnion");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (ArgumentPackage != null && __isset.ArgumentPackage)
         {
             field.Name = "ArgumentPackage";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             ArgumentPackage.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ArgumentPackageInterface != null && __isset.ArgumentPackageInterface)
         {
             field.Name = "ArgumentPackageInterface";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             ArgumentPackageInterface.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ArgumentPackageBinding != null && __isset.ArgumentPackageBinding)
         {
             field.Name = "ArgumentPackageBinding";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             ArgumentPackageBinding.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }