public static async Task InvokeAsync <TFrom>( this IAsyncFunc <TFrom, Void> func, TFrom from, CancellationToken cancellationToken = default(CancellationToken)) { await func.InvokeAsync(from, cancellationToken); }
public async Task <Result> InvokeAsync(TContext context, CancellationToken cancellationToken) { await asyncFunc.InvokeAsync(context, cancellationToken).ConfigureAwait(false); return(Result.Completed); }
public static async Task <TTo> InvokeAsync <TTo>( this IAsyncFunc <Void, TTo> func, CancellationToken cancellationToken = default(CancellationToken)) { return(await func.InvokeAsync(Void.Instance, cancellationToken)); }