System.Runtime.TaskHelpers
namespace System.Runtime
{
public static class TaskHelpers
{
public delegate TResult EndWithOutDelegate<T1, TResult> (IAsyncResult iar, out T1 arg1);
public static Action<object> OnAsyncCompletionCallback;
public static Task AsyncWait<TException>(this Task task);
public static Task<TResult> ToApm<TResult>(this Task<TResult> task, AsyncCallback callback, object state);
public static Task ToApm(this Task task, AsyncCallback callback, object state);
public static TResult ToApmEnd<TResult>(this IAsyncResult iar);
public static void ToApmEnd(this IAsyncResult iar);
public static Task<(TOut1, TOut2)> FromAsync<TIn, TOut1, TOut2>(Func<TIn, AsyncCallback, object, IAsyncResult> beginDelegate, EndWithOutDelegate<TOut2, TOut1> endDelegate, TIn arg1, object state);
public static Task CloseHelperAsync(this ICommunicationObject communicationObject, TimeSpan timeout);
public static Task OpenHelperAsync(this ICommunicationObject communicationObject, TimeSpan timeout);
public static Task<bool> AwaitWithTimeout(this Task task, TimeSpan timeout);
public static void WaitForCompletion(this Task task);
public static void WaitForCompletionNoSpin(this Task task);
public static TResult WaitForCompletion<TResult>(this Task<TResult> task);
public static TResult WaitForCompletionNoSpin<TResult>(this Task<TResult> task);
public static bool WaitForCompletionNoSpin(this Task task, TimeSpan timeout);
public static void Wait(this Task task, TimeSpan timeout, Action<Exception, TimeSpan, string> exceptionConverter, string operationType);
public static Task CompletedTask();
public static DefaultTaskSchedulerAwaiter EnsureDefaultTaskScheduler();
public static IDisposable RunTaskContinuationsOnOurThreads();
public static Task CallActionAsync<TArg>(Action<TArg> action, TArg argument);
}
}