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

        if ((C != null) && __isset.c)
        {
            tmp379.C = this.C;
        }
        tmp379.__isset.c = this.__isset.c;
        if (__isset.ts)
        {
            tmp379.Ts = this.Ts;
        }
        tmp379.__isset.ts = this.__isset.ts;
        if ((V != null) && __isset.v)
        {
            tmp379.V = this.V.DeepCopy();
        }
        tmp379.__isset.v = this.__isset.v;
        return(tmp379);
    }
コード例 #2
0
ファイル: FCells.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.Map)
                    {
                        {
                            TMap _map389 = await iprot.ReadMapBeginAsync(cancellationToken);

                            F = new Dictionary <byte[], FCells>(_map389.Count);
                            for (int _i390 = 0; _i390 < _map389.Count; ++_i390)
                            {
                                byte[] _key391;
                                FCells _val392;
                                _key391 = await iprot.ReadBinaryAsync(cancellationToken);

                                _val392 = new FCells();
                                await _val392.ReadAsync(iprot, cancellationToken);

                                F[_key391] = _val392;
                            }
                            await iprot.ReadMapEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

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

                            Cells = new List <FCell>(_list393.Count);
                            for (int _i394 = 0; _i394 < _list393.Count; ++_i394)
                            {
                                FCell _elem395;
                                _elem395 = new FCell();
                                await _elem395.ReadAsync(iprot, cancellationToken);

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

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

                            Serial_cells = new List <FCellSerial>(_list396.Count);
                            for (int _i397 = 0; _i397 < _list396.Count; ++_i397)
                            {
                                FCellSerial _elem398;
                                _elem398 = new FCellSerial();
                                await _elem398.ReadAsync(iprot, cancellationToken);

                                Serial_cells.Add(_elem398);
                            }
                            await iprot.ReadListEndAsync(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();
        }
    }