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 _list352 = iprot.ReadListBegin();
                                for (int _i353 = 0; _i353 < _list352.Count; ++_i353)
                                {
                                    TDDIKeyValueMapRef _elem354;
                                    _elem354 = new TDDIKeyValueMapRef();
                                    _elem354.Read(iprot);
                                    KeyValueMaps.Add(_elem354);
                                }
                                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)
                        {
                            {
                                DependabilityArtifacts = new List <TDDIAbstractDependabilityArtifactRef>();
                                TList _list355 = iprot.ReadListBegin();
                                for (int _i356 = 0; _i356 < _list355.Count; ++_i356)
                                {
                                    TDDIAbstractDependabilityArtifactRef _elem357;
                                    _elem357 = new TDDIAbstractDependabilityArtifactRef();
                                    _elem357.Read(iprot);
                                    DependabilityArtifacts.Add(_elem357);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                ParticipantPackages = new List <TDDIAbstractDependabilityPackageRef>();
                                TList _list358 = iprot.ReadListBegin();
                                for (int _i359 = 0; _i359 < _list358.Count; ++_i359)
                                {
                                    TDDIAbstractDependabilityPackageRef _elem360;
                                    _elem360 = new TDDIAbstractDependabilityPackageRef();
                                    _elem360.Read(iprot);
                                    ParticipantPackages.Add(_elem360);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Example #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 _list336 = iprot.ReadListBegin();
                                for (int _i337 = 0; _i337 < _list336.Count; ++_i337)
                                {
                                    TDDIKeyValueMapRef _elem338;
                                    _elem338 = new TDDIKeyValueMapRef();
                                    _elem338.Read(iprot);
                                    KeyValueMaps.Add(_elem338);
                                }
                                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)
                        {
                            {
                                DependabilityArtifacts = new List <TDDIAbstractDependabilityArtifactRef>();
                                TList _list339 = iprot.ReadListBegin();
                                for (int _i340 = 0; _i340 < _list339.Count; ++_i340)
                                {
                                    TDDIAbstractDependabilityArtifactRef _elem341;
                                    _elem341 = new TDDIAbstractDependabilityArtifactRef();
                                    _elem341.Read(iprot);
                                    DependabilityArtifacts.Add(_elem341);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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