Astn/JSON-RPC.NET

Add async/await support instead of IAsyncResult

DenisBalan opened this issue · 2 comments

Currently self-hosted wiki documentation states that JsonRpcStateAsync should be used.
Which inherits from IAsyncResult, and other classes as well have old asynchronous model classes and properties (WaitHandle, AsyncState, IsCompleted etc).

This issue is to propose to migrate to newer model of async programming model.

Astn commented

Great catch @DenisBalan, the wiki is out dated.

Using one of the Process functions that returns a Task is the way to go!

public static Task<string> Process(string jsonRpc, object context = null)

Astn commented

I updated the example on https://github.com/Astn/JSON-RPC.NET/wiki/Getting-Started-(Console)
If there is another place, feel free to update it. The wiki is open.