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.String)
                        {
                            Gid = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

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

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

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                ImplementationConstraint = new List <TDDIImplementationConstraintRef>();
                                TList _list1252 = iprot.ReadListBegin();
                                for (int _i1253 = 0; _i1253 < _list1252.Count; ++_i1253)
                                {
                                    TDDIImplementationConstraintRef _elem1254;
                                    _elem1254 = new TDDIImplementationConstraintRef();
                                    _elem1254.Read(iprot);
                                    ImplementationConstraint.Add(_elem1254);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                Note = new List <TDDINoteRef>();
                                TList _list1255 = iprot.ReadListBegin();
                                for (int _i1256 = 0; _i1256 < _list1255.Count; ++_i1256)
                                {
                                    TDDINoteRef _elem1257;
                                    _elem1257 = new TDDINoteRef();
                                    _elem1257.Read(iprot);
                                    Note.Add(_elem1257);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                TaggedValue = new List <TDDITaggedValueRef>();
                                TList _list1258 = iprot.ReadListBegin();
                                for (int _i1259 = 0; _i1259 < _list1258.Count; ++_i1259)
                                {
                                    TDDITaggedValueRef _elem1260;
                                    _elem1260 = new TDDITaggedValueRef();
                                    _elem1260.Read(iprot);
                                    TaggedValue.Add(_elem1260);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                Property = new List <TDDIPropertyRef>();
                                TList _list1261 = iprot.ReadListBegin();
                                for (int _i1262 = 0; _i1262 < _list1261.Count; ++_i1262)
                                {
                                    TDDIPropertyRef _elem1263;
                                    _elem1263 = new TDDIPropertyRef();
                                    _elem1263.Read(iprot);
                                    Property.Add(_elem1263);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
예제 #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.String)
                        {
                            Gid = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

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

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

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                ImplementationConstraint = new List <TDDIImplementationConstraintRef>();
                                TList _list1348 = iprot.ReadListBegin();
                                for (int _i1349 = 0; _i1349 < _list1348.Count; ++_i1349)
                                {
                                    TDDIImplementationConstraintRef _elem1350;
                                    _elem1350 = new TDDIImplementationConstraintRef();
                                    _elem1350.Read(iprot);
                                    ImplementationConstraint.Add(_elem1350);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                Note = new List <TDDINoteRef>();
                                TList _list1351 = iprot.ReadListBegin();
                                for (int _i1352 = 0; _i1352 < _list1351.Count; ++_i1352)
                                {
                                    TDDINoteRef _elem1353;
                                    _elem1353 = new TDDINoteRef();
                                    _elem1353.Read(iprot);
                                    Note.Add(_elem1353);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                TaggedValue = new List <TDDITaggedValueRef>();
                                TList _list1354 = iprot.ReadListBegin();
                                for (int _i1355 = 0; _i1355 < _list1354.Count; ++_i1355)
                                {
                                    TDDITaggedValueRef _elem1356;
                                    _elem1356 = new TDDITaggedValueRef();
                                    _elem1356.Read(iprot);
                                    TaggedValue.Add(_elem1356);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                Property = new List <TDDIPropertyRef>();
                                TList _list1357 = iprot.ReadListBegin();
                                for (int _i1358 = 0; _i1358 < _list1357.Count; ++_i1358)
                                {
                                    TDDIPropertyRef _elem1359;
                                    _elem1359 = new TDDIPropertyRef();
                                    _elem1359.Read(iprot);
                                    Property.Add(_elem1359);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.List)
                        {
                            {
                                Source = new List <TDDIAbstractArtifactAssetRef>();
                                TList _list1360 = iprot.ReadListBegin();
                                for (int _i1361 = 0; _i1361 < _list1360.Count; ++_i1361)
                                {
                                    TDDIAbstractArtifactAssetRef _elem1362;
                                    _elem1362 = new TDDIAbstractArtifactAssetRef();
                                    _elem1362.Read(iprot);
                                    Source.Add(_elem1362);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 13:
                        if (field.Type == TType.List)
                        {
                            {
                                Target = new List <TDDIAbstractArtifactAssetRef>();
                                TList _list1363 = iprot.ReadListBegin();
                                for (int _i1364 = 0; _i1364 < _list1363.Count; ++_i1364)
                                {
                                    TDDIAbstractArtifactAssetRef _elem1365;
                                    _elem1365 = new TDDIAbstractArtifactAssetRef();
                                    _elem1365.Read(iprot);
                                    Target.Add(_elem1365);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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