public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I64)
                        {
                            Id = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.String)
                        {
                            Name = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.String)
                        {
                            Description = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Bool)
                        {
                            IsCitation = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Bool)
                        {
                            IsAbstract = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMapRef>();
                                TList _list844 = iprot.ReadListBegin();
                                for (int _i845 = 0; _i845 < _list844.Count; ++_i845)
                                {
                                    TDDIKeyValueMapRef _elem846;
                                    _elem846 = new TDDIKeyValueMapRef();
                                    _elem846.Read(iprot);
                                    KeyValueMaps.Add(_elem846);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            CitedElement = new TDDIAbstractBaseElement();
                            CitedElement.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                FailureAnalysisArtifacts = new List <TDDIAbstractFailureAnalysisArtifactRef>();
                                TList _list847 = iprot.ReadListBegin();
                                for (int _i848 = 0; _i848 < _list847.Count; ++_i848)
                                {
                                    TDDIAbstractFailureAnalysisArtifactRef _elem849;
                                    _elem849 = new TDDIAbstractFailureAnalysisArtifactRef();
                                    _elem849.Read(iprot);
                                    FailureAnalysisArtifacts.Add(_elem849);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                MarkovArtifacts = new List <TDDIAbstractMarkovArtifact>();
                                TList _list850 = iprot.ReadListBegin();
                                for (int _i851 = 0; _i851 < _list850.Count; ++_i851)
                                {
                                    TDDIAbstractMarkovArtifact _elem852;
                                    _elem852 = new TDDIAbstractMarkovArtifact();
                                    _elem852.Read(iprot);
                                    MarkovArtifacts.Add(_elem852);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                FailStates = new List <TDDIFailState>();
                                TList _list853 = iprot.ReadListBegin();
                                for (int _i854 = 0; _i854 < _list853.Count; ++_i854)
                                {
                                    TDDIFailState _elem855;
                                    _elem855 = new TDDIFailState();
                                    _elem855.Read(iprot);
                                    FailStates.Add(_elem855);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.Struct)
                        {
                            Implements = new TDDIAbstractMarkovChainPackage();
                            Implements.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Exemplo n.º 2
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I64)
                        {
                            Id = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.String)
                        {
                            Name = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.String)
                        {
                            Description = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Bool)
                        {
                            IsCitation = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Bool)
                        {
                            IsAbstract = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMapRef>();
                                TList _list860 = iprot.ReadListBegin();
                                for (int _i861 = 0; _i861 < _list860.Count; ++_i861)
                                {
                                    TDDIKeyValueMapRef _elem862;
                                    _elem862 = new TDDIKeyValueMapRef();
                                    _elem862.Read(iprot);
                                    KeyValueMaps.Add(_elem862);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            CitedElement = new TDDIAbstractBaseElement();
                            CitedElement.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                FailureAnalysisArtifacts = new List <TDDIAbstractFailureAnalysisArtifactRef>();
                                TList _list863 = iprot.ReadListBegin();
                                for (int _i864 = 0; _i864 < _list863.Count; ++_i864)
                                {
                                    TDDIAbstractFailureAnalysisArtifactRef _elem865;
                                    _elem865 = new TDDIAbstractFailureAnalysisArtifactRef();
                                    _elem865.Read(iprot);
                                    FailureAnalysisArtifacts.Add(_elem865);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                MarkovArtifacts = new List <TDDIAbstractMarkovArtifact>();
                                TList _list866 = iprot.ReadListBegin();
                                for (int _i867 = 0; _i867 < _list866.Count; ++_i867)
                                {
                                    TDDIAbstractMarkovArtifact _elem868;
                                    _elem868 = new TDDIAbstractMarkovArtifact();
                                    _elem868.Read(iprot);
                                    MarkovArtifacts.Add(_elem868);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                FailStates = new List <TDDIFailState>();
                                TList _list869 = iprot.ReadListBegin();
                                for (int _i870 = 0; _i870 < _list869.Count; ++_i870)
                                {
                                    TDDIFailState _elem871;
                                    _elem871 = new TDDIFailState();
                                    _elem871.Read(iprot);
                                    FailStates.Add(_elem871);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                ParticipantPackages = new List <TDDIAbstractMarkovChainPackageRef>();
                                TList _list872 = iprot.ReadListBegin();
                                for (int _i873 = 0; _i873 < _list872.Count; ++_i873)
                                {
                                    TDDIAbstractMarkovChainPackageRef _elem874;
                                    _elem874 = new TDDIAbstractMarkovChainPackageRef();
                                    _elem874.Read(iprot);
                                    ParticipantPackages.Add(_elem874);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I64)
                        {
                            Id = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.String)
                        {
                            Name = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.String)
                        {
                            Description = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Bool)
                        {
                            IsCitation = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Bool)
                        {
                            IsAbstract = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMapRef>();
                                TList _list828 = iprot.ReadListBegin();
                                for (int _i829 = 0; _i829 < _list828.Count; ++_i829)
                                {
                                    TDDIKeyValueMapRef _elem830;
                                    _elem830 = new TDDIKeyValueMapRef();
                                    _elem830.Read(iprot);
                                    KeyValueMaps.Add(_elem830);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            CitedElement = new TDDIAbstractBaseElement();
                            CitedElement.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                FailureAnalysisArtifacts = new List <TDDIAbstractFailureAnalysisArtifactRef>();
                                TList _list831 = iprot.ReadListBegin();
                                for (int _i832 = 0; _i832 < _list831.Count; ++_i832)
                                {
                                    TDDIAbstractFailureAnalysisArtifactRef _elem833;
                                    _elem833 = new TDDIAbstractFailureAnalysisArtifactRef();
                                    _elem833.Read(iprot);
                                    FailureAnalysisArtifacts.Add(_elem833);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                MarkovArtifacts = new List <TDDIAbstractMarkovArtifact>();
                                TList _list834 = iprot.ReadListBegin();
                                for (int _i835 = 0; _i835 < _list834.Count; ++_i835)
                                {
                                    TDDIAbstractMarkovArtifact _elem836;
                                    _elem836 = new TDDIAbstractMarkovArtifact();
                                    _elem836.Read(iprot);
                                    MarkovArtifacts.Add(_elem836);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                FailStates = new List <TDDIFailState>();
                                TList _list837 = iprot.ReadListBegin();
                                for (int _i838 = 0; _i838 < _list837.Count; ++_i838)
                                {
                                    TDDIFailState _elem839;
                                    _elem839 = new TDDIFailState();
                                    _elem839.Read(iprot);
                                    FailStates.Add(_elem839);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.Struct)
                        {
                            FailureLogicPackage = new TDDIAbstractFailureLogicPackage();
                            FailureLogicPackage.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Struct)
                        {
                            MinimalCutset = new TDDIMinimalCutset();
                            MinimalCutset.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            InterfaceFailurePropagation = new TDDIInterfaceFailurePropagation();
                            InterfaceFailurePropagation.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Struct)
                        {
                            Failure = new TDDIAbstractFailure();
                            Failure.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Struct)
                        {
                            FailureMode = new TDDIFailureMode();
                            FailureMode.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.Struct)
                        {
                            ProbabilityDistribution = new TDDIProbabilityDistribution();
                            ProbabilityDistribution.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            ProbDistParam = new TDDIProbDistParam();
                            ProbDistParam.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.Struct)
                        {
                            FTAArtifact = new TDDIAbstractFTAArtifact();
                            FTAArtifact.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.Struct)
                        {
                            FMEAArtifact = new TDDIAbstractFMEAArtifact();
                            FMEAArtifact.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.Struct)
                        {
                            MarkovArtifact = new TDDIAbstractMarkovArtifact();
                            MarkovArtifact.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }