Ejemplo n.º 1
0
    public SchemaPattern DeepCopy()
    {
        var tmp14 = new SchemaPattern();

        if (__isset.comp)
        {
            tmp14.Comp = this.Comp;
        }
        tmp14.__isset.comp = this.__isset.comp;
        if ((Value != null) && __isset.@value)
        {
            tmp14.Value = this.Value;
        }
        tmp14.__isset.@value = this.__isset.@value;
        return(tmp14);
    }
Ejemplo n.º 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 _list29 = await iprot.ReadListBeginAsync(cancellationToken);

                            Names = new List <SchemaPattern>(_list29.Count);
                            for (int _i30 = 0; _i30 < _list29.Count; ++_i30)
                            {
                                SchemaPattern _elem31;
                                _elem31 = new SchemaPattern();
                                await _elem31.ReadAsync(iprot, cancellationToken);

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

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        Tags = new SchemaTagsPatterns();
                        await Tags.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();
        }
    }