Exemple #1
0
    public SchemaPatterns DeepCopy()
    {
        var tmp28 = new SchemaPatterns();

        if ((Names != null) && __isset.names)
        {
            tmp28.Names = this.Names.DeepCopy();
        }
        tmp28.__isset.names = this.__isset.names;
        if ((Tags != null) && __isset.tags)
        {
            tmp28.Tags = (SchemaTagsPatterns)this.Tags.DeepCopy();
        }
        tmp28.__isset.tags = this.__isset.tags;
        return(tmp28);
    }
Exemple #2
0
    public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);

            while (true)
            {
                field = await iprot.ReadFieldBeginAsync(cancellationToken);

                if (field.Type == TType.Stop)
                {
                    break;
                }

                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.List)
                    {
                        {
                            TList _list38 = await iprot.ReadListBeginAsync(cancellationToken);

                            Cids = new List <long>(_list38.Count);
                            for (int _i39 = 0; _i39 < _list38.Count; ++_i39)
                            {
                                long _elem40;
                                _elem40 = await iprot.ReadI64Async(cancellationToken);

                                Cids.Add(_elem40);
                            }
                            await iprot.ReadListEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            TList _list41 = await iprot.ReadListBeginAsync(cancellationToken);

                            Names = new List <string>(_list41.Count);
                            for (int _i42 = 0; _i42 < _list41.Count; ++_i42)
                            {
                                string _elem43;
                                _elem43 = await iprot.ReadStringAsync(cancellationToken);

                                Names.Add(_elem43);
                            }
                            await iprot.ReadListEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        Patterns = new SchemaPatterns();
                        await Patterns.ReadAsync(iprot, cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                default:
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                    break;
                }

                await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }