コード例 #1
0
    public kCells DeepCopy()
    {
        var tmp357 = new kCells();

        if ((K != null) && __isset.k)
        {
            tmp357.K = this.K.DeepCopy();
        }
        tmp357.__isset.k = this.__isset.k;
        if ((Cells != null) && __isset.cells)
        {
            tmp357.Cells = this.Cells.DeepCopy();
        }
        tmp357.__isset.cells = this.__isset.cells;
        if ((Serial_cells != null) && __isset.serial_cells)
        {
            tmp357.Serial_cells = this.Serial_cells.DeepCopy();
        }
        tmp357.__isset.serial_cells = this.__isset.serial_cells;
        return(tmp357);
    }
コード例 #2
0
ファイル: CellsGroup.cs プロジェクト: thither/swc-db
    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.Struct)
                    {
                        Cells = new Cells();
                        await Cells.ReadAsync(iprot, cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            TMap _map407 = await iprot.ReadMapBeginAsync(cancellationToken);

                            Ccells = new Dictionary <string, ColCells>(_map407.Count);
                            for (int _i408 = 0; _i408 < _map407.Count; ++_i408)
                            {
                                string   _key409;
                                ColCells _val410;
                                _key409 = await iprot.ReadStringAsync(cancellationToken);

                                _val410 = new ColCells();
                                await _val410.ReadAsync(iprot, cancellationToken);

                                Ccells[_key409] = _val410;
                            }
                            await iprot.ReadMapEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

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

                            Kcells = new List <kCells>(_list411.Count);
                            for (int _i412 = 0; _i412 < _list411.Count; ++_i412)
                            {
                                kCells _elem413;
                                _elem413 = new kCells();
                                await _elem413.ReadAsync(iprot, cancellationToken);

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

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