/// <summary></summary> /// <typeparam name="TResult"></typeparam> /// <param name="function"></param> /// <param name="cancellationToken"></param> /// <returns></returns> public static Task <TResult> Run <TResult>(Func <Task <TResult> > function, CancellationToken cancellationToken) => TaskExtensions.Unwrap(Run <Task <TResult> >(function, cancellationToken));
public static Task <TResult> Run <TResult>(Func <Task <TResult> > function, CancellationToken cancellationToken) { return(TaskExtensions.Unwrap <TResult>(TaskEx.Run <Task <TResult> >(function, cancellationToken))); }
/// <summary></summary> /// <param name="function"></param> /// <param name="cancellationToken"></param> /// <returns></returns> public static Task Run(Func <Task> function, CancellationToken cancellationToken) => TaskExtensions.Unwrap(Run <Task>(function, cancellationToken));
public static Task Run(Func <Task> function, CancellationToken cancellationToken) { return(TaskExtensions.Unwrap(TaskEx.Run <Task>(function, cancellationToken))); }