[ 
https://issues.apache.org/jira/browse/THRIFT-4816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer updated THRIFT-4816:
-------------------------------
    Description: 
It's hard to tell what Context.WriteAsync() does in the following example 
unless one looks at the implementations.

{code}
private async Task WriteJsonObjectStartAsync(CancellationToken 
cancellationToken)
{
        await Context.WriteAsync(cancellationToken);
        await Trans.WriteAsync(TJSONProtocolConstants.LeftBrace, 
cancellationToken);
        PushContext(new JSONPairContext(this));
}
 {code}

 

 

  was:
It's hard to tell what Context.WriteAsync() does in the following example 
unless one looks at the implementations.

{code}
        private async Task WriteJsonObjectStartAsync(CancellationToken 
cancellationToken)
        {
            await Context.WriteAsync(cancellationToken);
            await Trans.WriteAsync(TJSONProtocolConstants.LeftBrace, 
cancellationToken);
            PushContext(new JSONPairContext(this));
        }
 {code}

 

 


> JSONTransports Context.WriteAsync/ReadAsync are badly named
> -----------------------------------------------------------
>
>                 Key: THRIFT-4816
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4816
>             Project: Thrift
>          Issue Type: Improvement
>          Components: netstd - Library
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>            Priority: Minor
>
> It's hard to tell what Context.WriteAsync() does in the following example 
> unless one looks at the implementations.
> {code}
> private async Task WriteJsonObjectStartAsync(CancellationToken 
> cancellationToken)
> {
>         await Context.WriteAsync(cancellationToken);
>         await Trans.WriteAsync(TJSONProtocolConstants.LeftBrace, 
> cancellationToken);
>         PushContext(new JSONPairContext(this));
> }
>  {code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to