Пример #1
0
 public static async Task InvokeAsync <TFrom>(
     this IAsyncFunc <TFrom, Void> func,
     TFrom from,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     await func.InvokeAsync(from, cancellationToken);
 }
Пример #2
0
        public async Task <Result> InvokeAsync(TContext context, CancellationToken cancellationToken)
        {
            await asyncFunc.InvokeAsync(context, cancellationToken).ConfigureAwait(false);

            return(Result.Completed);
        }
Пример #3
0
 public static async Task <TTo> InvokeAsync <TTo>(
     this IAsyncFunc <Void, TTo> func,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     return(await func.InvokeAsync(Void.Instance, cancellationToken));
 }