コード例 #1
0
    public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
    {
        oprot.IncrementRecursionDepth();
        try
        {
            var struc = new TStruct("GetSquareChatMembersResponse");
            await oprot.WriteStructBeginAsync(struc, cancellationToken);

            var field = new TField();
            if (SquareChatMembers != null && __isset.squareChatMembers)
            {
                field.Name = "squareChatMembers";
                field.Type = TType.Struct;
                field.ID   = 1;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await SquareChatMembers.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if (ContinuationToken != null && __isset.continuationToken)
            {
                field.Name = "continuationToken";
                field.Type = TType.String;
                field.ID   = 2;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await oprot.WriteStringAsync(ContinuationToken, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);

            await oprot.WriteStructEndAsync(cancellationToken);
        }
        finally
        {
            oprot.DecrementRecursionDepth();
        }
    }