Пример #1
0
        public SharedStruct DeepCopy()
        {
            var tmp0 = new SharedStruct();

            if (__isset.key)
            {
                tmp0.Key = this.Key;
            }
            tmp0.__isset.key = this.__isset.key;
            if ((Value != null) && __isset.@value)
            {
                tmp0.Value = this.Value;
            }
            tmp0.__isset.@value = this.__isset.@value;
            return(tmp0);
        }
Пример #2
0
            public async 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 0:
                            if (field.Type == TType.Struct)
                            {
                                Success = new SharedStruct();
                                await Success.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();
                }
            }