Remove the sync extension stuff.
MODIFY
WalletWasabi/Nito/AsyncEx/TaskCompletionSourceExtensions.cs
WalletWasabi/Nito/AsyncEx/TaskCompletionSourceExtensions.cs
@@ -49,51 +49,6 @@ namespace Nito.AsyncEx
return @this.TrySetResult(task.Result);
}
- /// <summary>
- /// Attempts to complete a <see cref="TaskCompletionSource{TResult}"/>, propagating the completion of <paramref name="task"/> but using the result value from <paramref name="resultFunc"/> if the task completed successfully.
- /// </summary>
- /// <typeparam name="TResult">The type of the result of the target asynchronous operation.</typeparam>
- /// <param name="this">The task completion source. May not be <c>null</c>.</param>
- /// <param name="task">The task. May not be <c>null</c>.</param>
- /// <param name="resultFunc">A delegate that returns the result with which to complete the task completion source, if the task completed successfully. May not be <c>null</c>.</param>
- /// <returns><c>true</c> if this method completed the task completion source; <c>false</c> if it was already completed.</returns>
- public static bool TryCompleteFromCompletedTask<TResult>(this TaskCompletionSource<TResult> @this, Task task, Func<TResult> resultFunc)
- {
- if (@this is null)
- {
- throw new ArgumentNullException(nameof(@this));
- }
-
- if (task is null)
- {
- throw new ArgumentNullException(nameof(task));
- }
-
- if (resultFunc is null)
- {
- throw new ArgumentNullException(nameof(resultFunc));
- }
-
- if (task.IsFaulted)
- {
- return @this.TrySetException(task.Exception.InnerExceptions);
- }
-
- if (task.IsCanceled)
- {
- try
- {
- task.WaitAndUnwrapException();
- }
- catch (OperationCanceledException exception)
- {
- var token = exception.CancellationToken;
- return token.IsCancellationRequested ? @this.TrySetCanceled(token) : @this.TrySetCanceled();
- }
- }
- return @this.TrySetResult(resultFunc());
- }
-
/// <summary>
/// Creates a new TCS for use with async code, and which forces its continuations to execute asynchronously.
/// </summary>

Remove the sync extension stuff.