public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIInternalFailureUnion");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (InternalFailure != null && __isset.InternalFailure)
         {
             field.Name = "InternalFailure";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             InternalFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (BasicEvent != null && __isset.BasicEvent)
         {
             field.Name = "BasicEvent";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             BasicEvent.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (FMEAFailure != null && __isset.FMEAFailure)
         {
             field.Name = "FMEAFailure";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             FMEAFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (FailState != null && __isset.FailState)
         {
             field.Name = "FailState";
             field.Type = TType.Struct;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             FailState.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Esempio n. 2
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIFailureUnion");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (InterfaceFailure != null && __isset.InterfaceFailure)
         {
             field.Name = "InterfaceFailure";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             InterfaceFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (InternalFailure != null && __isset.InternalFailure)
         {
             field.Name = "InternalFailure";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             InternalFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (CCF != null && __isset.CCF)
         {
             field.Name = "CCF";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             CCF.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }