Пример #1
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 _list620 = iprot.ReadListBegin();
                                for (int _i621 = 0; _i621 < _list620.Count; ++_i621)
                                {
                                    TDDIKeyValueMapRef _elem622;
                                    _elem622 = new TDDIKeyValueMapRef();
                                    _elem622.Read(iprot);
                                    KeyValueMaps.Add(_elem622);
                                }
                                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 _list623 = iprot.ReadListBegin();
                                for (int _i624 = 0; _i624 < _list623.Count; ++_i624)
                                {
                                    TDDIAbstractFailureAnalysisArtifactRef _elem625;
                                    _elem625 = new TDDIAbstractFailureAnalysisArtifactRef();
                                    _elem625.Read(iprot);
                                    FailureAnalysisArtifacts.Add(_elem625);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                FTAArtifacts = new List <TDDIAbstractFTAArtifact>();
                                TList _list626 = iprot.ReadListBegin();
                                for (int _i627 = 0; _i627 < _list626.Count; ++_i627)
                                {
                                    TDDIAbstractFTAArtifact _elem628;
                                    _elem628 = new TDDIAbstractFTAArtifact();
                                    _elem628.Read(iprot);
                                    FTAArtifacts.Add(_elem628);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                BasicEvents = new List <TDDIBasicEvent>();
                                TList _list629 = iprot.ReadListBegin();
                                for (int _i630 = 0; _i630 < _list629.Count; ++_i630)
                                {
                                    TDDIBasicEvent _elem631;
                                    _elem631 = new TDDIBasicEvent();
                                    _elem631.Read(iprot);
                                    BasicEvents.Add(_elem631);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.Struct)
                        {
                            Implements = new TDDIAbstractFTAPackage();
                            Implements.Read(iprot);
                        }
                        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)
                        {
                            InternalFailure = new TDDIInternalFailure();
                            InternalFailure.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Пример #3
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 _list636 = iprot.ReadListBegin();
                                for (int _i637 = 0; _i637 < _list636.Count; ++_i637)
                                {
                                    TDDIKeyValueMapRef _elem638;
                                    _elem638 = new TDDIKeyValueMapRef();
                                    _elem638.Read(iprot);
                                    KeyValueMaps.Add(_elem638);
                                }
                                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 _list639 = iprot.ReadListBegin();
                                for (int _i640 = 0; _i640 < _list639.Count; ++_i640)
                                {
                                    TDDIAbstractFailureAnalysisArtifactRef _elem641;
                                    _elem641 = new TDDIAbstractFailureAnalysisArtifactRef();
                                    _elem641.Read(iprot);
                                    FailureAnalysisArtifacts.Add(_elem641);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                FTAArtifacts = new List <TDDIAbstractFTAArtifact>();
                                TList _list642 = iprot.ReadListBegin();
                                for (int _i643 = 0; _i643 < _list642.Count; ++_i643)
                                {
                                    TDDIAbstractFTAArtifact _elem644;
                                    _elem644 = new TDDIAbstractFTAArtifact();
                                    _elem644.Read(iprot);
                                    FTAArtifacts.Add(_elem644);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                BasicEvents = new List <TDDIBasicEvent>();
                                TList _list645 = iprot.ReadListBegin();
                                for (int _i646 = 0; _i646 < _list645.Count; ++_i646)
                                {
                                    TDDIBasicEvent _elem647;
                                    _elem647 = new TDDIBasicEvent();
                                    _elem647.Read(iprot);
                                    BasicEvents.Add(_elem647);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                ParticipantPackages = new List <TDDIAbstractFTAPackageRef>();
                                TList _list648 = iprot.ReadListBegin();
                                for (int _i649 = 0; _i649 < _list648.Count; ++_i649)
                                {
                                    TDDIAbstractFTAPackageRef _elem650;
                                    _elem650 = new TDDIAbstractFTAPackageRef();
                                    _elem650.Read(iprot);
                                    ParticipantPackages.Add(_elem650);
                                }
                                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 _list604 = iprot.ReadListBegin();
                                for (int _i605 = 0; _i605 < _list604.Count; ++_i605)
                                {
                                    TDDIKeyValueMapRef _elem606;
                                    _elem606 = new TDDIKeyValueMapRef();
                                    _elem606.Read(iprot);
                                    KeyValueMaps.Add(_elem606);
                                }
                                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 _list607 = iprot.ReadListBegin();
                                for (int _i608 = 0; _i608 < _list607.Count; ++_i608)
                                {
                                    TDDIAbstractFailureAnalysisArtifactRef _elem609;
                                    _elem609 = new TDDIAbstractFailureAnalysisArtifactRef();
                                    _elem609.Read(iprot);
                                    FailureAnalysisArtifacts.Add(_elem609);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                FTAArtifacts = new List <TDDIAbstractFTAArtifact>();
                                TList _list610 = iprot.ReadListBegin();
                                for (int _i611 = 0; _i611 < _list610.Count; ++_i611)
                                {
                                    TDDIAbstractFTAArtifact _elem612;
                                    _elem612 = new TDDIAbstractFTAArtifact();
                                    _elem612.Read(iprot);
                                    FTAArtifacts.Add(_elem612);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                BasicEvents = new List <TDDIBasicEvent>();
                                TList _list613 = iprot.ReadListBegin();
                                for (int _i614 = 0; _i614 < _list613.Count; ++_i614)
                                {
                                    TDDIBasicEvent _elem615;
                                    _elem615 = new TDDIBasicEvent();
                                    _elem615.Read(iprot);
                                    BasicEvents.Add(_elem615);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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