Exemplo n.º 1
0
    public SpecColumn DeepCopy()
    {
        var tmp122 = new SpecColumn();

        if (__isset.cid)
        {
            tmp122.Cid = this.Cid;
        }
        tmp122.__isset.cid = this.__isset.cid;
        if ((Intervals != null) && __isset.intervals)
        {
            tmp122.Intervals = this.Intervals.DeepCopy();
        }
        tmp122.__isset.intervals = this.__isset.intervals;
        return(tmp122);
    }
Exemplo 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 _list222 = await iprot.ReadListBeginAsync(cancellationToken);

                            Columns = new List <SpecColumn>(_list222.Count);
                            for (int _i223 = 0; _i223 < _list222.Count; ++_i223)
                            {
                                SpecColumn _elem224;
                                _elem224 = new SpecColumn();
                                await _elem224.ReadAsync(iprot, cancellationToken);

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

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

                            Columns_serial = new List <SpecColumnSerial>(_list225.Count);
                            for (int _i226 = 0; _i226 < _list225.Count; ++_i226)
                            {
                                SpecColumnSerial _elem227;
                                _elem227 = new SpecColumnSerial();
                                await _elem227.ReadAsync(iprot, cancellationToken);

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

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