예제 #1
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("TDDIInterfaceFailureUnion(");
            bool          __first = true;

            if (OutputFailure != null && __isset.OutputFailure)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("OutputFailure: ");
                __sb.Append(OutputFailure == null ? "<null>" : OutputFailure.ToString());
            }
            if (InputFailure != null && __isset.InputFailure)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("InputFailure: ");
                __sb.Append(InputFailure == null ? "<null>" : InputFailure.ToString());
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
예제 #2
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIInterfaceFailureUnion");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (OutputFailure != null && __isset.OutputFailure)
         {
             field.Name = "OutputFailure";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             OutputFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (InputFailure != null && __isset.InputFailure)
         {
             field.Name = "InputFailure";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             InputFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("TDDIFailState(");
            bool          __first = true;

            if (__isset.Id)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Id: ");
                __sb.Append(Id);
            }
            if (Name != null && __isset.Name)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Name: ");
                __sb.Append(Name);
            }
            if (Description != null && __isset.Description)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Description: ");
                __sb.Append(Description);
            }
            if (__isset.IsCitation)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsCitation: ");
                __sb.Append(IsCitation);
            }
            if (__isset.IsAbstract)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsAbstract: ");
                __sb.Append(IsAbstract);
            }
            if (KeyValueMaps != null && __isset.KeyValueMaps)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("KeyValueMaps: ");
                __sb.Append(KeyValueMaps);
            }
            if (CitedElement != null && __isset.CitedElement)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("CitedElement: ");
                __sb.Append(CitedElement == null ? "<null>" : CitedElement.ToString());
            }
            if (__isset.FailureRate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FailureRate: ");
                __sb.Append(FailureRate);
            }
            if (FailureMode != null && __isset.FailureMode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FailureMode: ");
                __sb.Append(FailureMode == null ? "<null>" : FailureMode.ToString());
            }
            if (ProbabilityDistribution != null && __isset.ProbabilityDistribution)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ProbabilityDistribution: ");
                __sb.Append(ProbabilityDistribution == null ? "<null>" : ProbabilityDistribution.ToString());
            }
            if (OutputFailure != null && __isset.OutputFailure)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("OutputFailure: ");
                __sb.Append(OutputFailure == null ? "<null>" : OutputFailure.ToString());
            }
            if (AssociatedStates != null && __isset.AssociatedStates)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("AssociatedStates: ");
                __sb.Append(AssociatedStates);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIFailState");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (__isset.Id)
         {
             field.Name = "Id";
             field.Type = TType.I64;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(Id);
             oprot.WriteFieldEnd();
         }
         if (Name != null && __isset.Name)
         {
             field.Name = "Name";
             field.Type = TType.String;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Name);
             oprot.WriteFieldEnd();
         }
         if (Description != null && __isset.Description)
         {
             field.Name = "Description";
             field.Type = TType.String;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Description);
             oprot.WriteFieldEnd();
         }
         if (__isset.IsCitation)
         {
             field.Name = "IsCitation";
             field.Type = TType.Bool;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(IsCitation);
             oprot.WriteFieldEnd();
         }
         if (__isset.IsAbstract)
         {
             field.Name = "IsAbstract";
             field.Type = TType.Bool;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(IsAbstract);
             oprot.WriteFieldEnd();
         }
         if (KeyValueMaps != null && __isset.KeyValueMaps)
         {
             field.Name = "KeyValueMaps";
             field.Type = TType.List;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, KeyValueMaps.Count));
                 foreach (TDDIKeyValueMapRef _iter822 in KeyValueMaps)
                 {
                     _iter822.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (CitedElement != null && __isset.CitedElement)
         {
             field.Name = "CitedElement";
             field.Type = TType.Struct;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             CitedElement.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.FailureRate)
         {
             field.Name = "FailureRate";
             field.Type = TType.Double;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             oprot.WriteDouble(FailureRate);
             oprot.WriteFieldEnd();
         }
         if (FailureMode != null && __isset.FailureMode)
         {
             field.Name = "FailureMode";
             field.Type = TType.Struct;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             FailureMode.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ProbabilityDistribution != null && __isset.ProbabilityDistribution)
         {
             field.Name = "ProbabilityDistribution";
             field.Type = TType.Struct;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             ProbabilityDistribution.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (OutputFailure != null && __isset.OutputFailure)
         {
             field.Name = "OutputFailure";
             field.Type = TType.Struct;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             OutputFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (AssociatedStates != null && __isset.AssociatedStates)
         {
             field.Name = "AssociatedStates";
             field.Type = TType.List;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, AssociatedStates.Count));
                 foreach (TDDIState _iter823 in AssociatedStates)
                 {
                     _iter823.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }