Example #1
0
 public static IConsumer <T> FromMethod <T>(Func <Task <T> > method, Action dispose = null)
 {
     return(FromMethod(ctx => ctx.IsCancellationRequested ? TaskEx.CreateCancelledTask <T>() : method(), dispose));
 }