internal static IAsyncAction CreateFaultedAction(Exception error) { if (error == null) throw new ArgumentNullException("error"); Contract.EndContractBlock(); var asyncInfo = new TaskToAsyncActionAdapter(isCanceled: false); asyncInfo.DangerousSetError(error); Debug.Assert(asyncInfo.Status == AsyncStatus.Error); return asyncInfo; }
internal static IAsyncAction CreateFaultedAction(Exception error) { if (error == null) { throw new ArgumentNullException(nameof(error)); } var asyncInfo = new TaskToAsyncActionAdapter(isCanceled: false); asyncInfo.DangerousSetError(error); Debug.Assert(asyncInfo.Status == AsyncStatus.Error); return(asyncInfo); }
internal static IAsyncAction CreateCompletedAction() { var asyncInfo = new TaskToAsyncActionAdapter(isCanceled: false); return(asyncInfo); }