From 3366b328bb5fc15451b605074b2efd9177b985f1 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Tue, 4 Jun 2019 17:09:30 -0700 Subject: [PATCH] Remove stale Task async extension methods from TaskExtensions (#24958) --- .../System/Threading/Tasks/TaskExtensions.cs | 30 ---------------------- 1 file changed, 30 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskExtensions.cs b/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskExtensions.cs index 52e4481..1e1f6ab 100644 --- a/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskExtensions.cs +++ b/src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskExtensions.cs @@ -47,35 +47,5 @@ namespace System.Threading.Tasks task.Result ?? Task.FromCanceled(new CancellationToken(true)); } - - // TODO: Remove the below three methods once corefx has consumed a build with them in their new TaskAsyncEnumerableExtensions location. - - /// Configures how awaits on the tasks returned from an async disposable will be performed. - /// The source async disposable. - /// Whether to capture and marshal back to the current context. - /// The configured async disposable. - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static ConfiguredAsyncDisposable ConfigureAwait(this IAsyncDisposable source, bool continueOnCapturedContext) => - new ConfiguredAsyncDisposable(source, continueOnCapturedContext); - - /// Configures how awaits on the tasks returned from an async iteration will be performed. - /// The type of the objects being iterated. - /// The source enumerable being iterated. - /// Whether to capture and marshal back to the current context. - /// The configured enumerable. - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static ConfiguredCancelableAsyncEnumerable ConfigureAwait( - this IAsyncEnumerable source, bool continueOnCapturedContext) => - new ConfiguredCancelableAsyncEnumerable(source, continueOnCapturedContext, cancellationToken: default); - - /// Sets the to be passed to when iterating. - /// The type of the objects being iterated. - /// The source enumerable being iterated. - /// The to use. - /// The configured enumerable. - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static ConfiguredCancelableAsyncEnumerable WithCancellation( - this IAsyncEnumerable source, CancellationToken cancellationToken) => - new ConfiguredCancelableAsyncEnumerable(source, continueOnCapturedContext: true, cancellationToken); } } -- 2.7.4