Exemplo n.º 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.Struct)
                        {
                            Ref = new TDDISecurityControl();
                            Ref.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.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMap>();
                                TList _list1512 = iprot.ReadListBegin();
                                for (int _i1513 = 0; _i1513 < _list1512.Count; ++_i1513)
                                {
                                    TDDIKeyValueMap _elem1514;
                                    _elem1514 = new TDDIKeyValueMap();
                                    _elem1514.Read(iprot);
                                    KeyValueMaps.Add(_elem1514);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.List)
                        {
                            {
                                IdentifiedRisks = new List <TDDISecurityRisk>();
                                TList _list1515 = iprot.ReadListBegin();
                                for (int _i1516 = 0; _i1516 < _list1515.Count; ++_i1516)
                                {
                                    TDDISecurityRisk _elem1517;
                                    _elem1517 = new TDDISecurityRisk();
                                    _elem1517.Read(iprot);
                                    IdentifiedRisks.Add(_elem1517);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                Controls = new List <TDDISecurityControl>();
                                TList _list1518 = iprot.ReadListBegin();
                                for (int _i1519 = 0; _i1519 < _list1518.Count; ++_i1519)
                                {
                                    TDDISecurityControl _elem1520;
                                    _elem1520 = new TDDISecurityControl();
                                    _elem1520.Read(iprot);
                                    Controls.Add(_elem1520);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.List)
                        {
                            {
                                ConsideredAssets = new List <TDDIAbstractAsset>();
                                TList _list1521 = iprot.ReadListBegin();
                                for (int _i1522 = 0; _i1522 < _list1521.Count; ++_i1522)
                                {
                                    TDDIAbstractAsset _elem1523;
                                    _elem1523 = new TDDIAbstractAsset();
                                    _elem1523.Read(iprot);
                                    ConsideredAssets.Add(_elem1523);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                ConsideredThreatAgents = new List <TDDIAbstractThreatAgent>();
                                TList _list1524 = iprot.ReadListBegin();
                                for (int _i1525 = 0; _i1525 < _list1524.Count; ++_i1525)
                                {
                                    TDDIAbstractThreatAgent _elem1526;
                                    _elem1526 = new TDDIAbstractThreatAgent();
                                    _elem1526.Read(iprot);
                                    ConsideredThreatAgents.Add(_elem1526);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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