async ValueTask RemoteRequest(IRemoteRequestHandler <int, byte[]>?handler) { if (handler == null) { throw new ArgumentNullException("handler"); } await handler.InvokeAsync(DataSize); }
public async Task RunClient(IRemoteRequestHandler <int, string> handler) { var v = await handler.InvokeAsync(100); Console.WriteLine(v); // "ECHO:100" }