From: Santiago Fernandez Madero Date: Wed, 5 Jun 2019 00:09:30 +0000 (-0700) Subject: Remove stale Task async extension methods from TaskExtensions (#24958) X-Git-Tag: accepted/tizen/unified/20190813.215958~40^2~275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3366b328bb5fc15451b605074b2efd9177b985f1;p=platform%2Fupstream%2Fcoreclr.git Remove stale Task async extension methods from TaskExtensions (#24958) --- 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); } }