diff options
author | Santiago Fernandez Madero <safern@microsoft.com> | 2019-06-04 17:09:30 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-06-04 17:09:30 -0700 |
commit | 3366b328bb5fc15451b605074b2efd9177b985f1 (patch) | |
tree | 897b3efb8c9100f46fe09f5e5fb78d2a68d29957 | |
parent | 89df4b9d928c7f21550d487328f5db000a498bdf (diff) | |
download | coreclr-3366b328bb5fc15451b605074b2efd9177b985f1.tar.gz coreclr-3366b328bb5fc15451b605074b2efd9177b985f1.tar.bz2 coreclr-3366b328bb5fc15451b605074b2efd9177b985f1.zip |
Remove stale Task async extension methods from TaskExtensions (#24958)
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Threading/Tasks/TaskExtensions.cs | 30 |
1 files changed, 0 insertions, 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 52e44815d1..1e1f6abcd1 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<TResult>(new CancellationToken(true)); } - - // TODO: Remove the below three methods once corefx has consumed a build with them in their new TaskAsyncEnumerableExtensions location. - - /// <summary>Configures how awaits on the tasks returned from an async disposable will be performed.</summary> - /// <param name="source">The source async disposable.</param> - /// <param name="continueOnCapturedContext">Whether to capture and marshal back to the current context.</param> - /// <returns>The configured async disposable.</returns> - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static ConfiguredAsyncDisposable ConfigureAwait(this IAsyncDisposable source, bool continueOnCapturedContext) => - new ConfiguredAsyncDisposable(source, continueOnCapturedContext); - - /// <summary>Configures how awaits on the tasks returned from an async iteration will be performed.</summary> - /// <typeparam name="T">The type of the objects being iterated.</typeparam> - /// <param name="source">The source enumerable being iterated.</param> - /// <param name="continueOnCapturedContext">Whether to capture and marshal back to the current context.</param> - /// <returns>The configured enumerable.</returns> - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait<T>( - this IAsyncEnumerable<T> source, bool continueOnCapturedContext) => - new ConfiguredCancelableAsyncEnumerable<T>(source, continueOnCapturedContext, cancellationToken: default); - - /// <summary>Sets the <see cref="CancellationToken"/> to be passed to <see cref="IAsyncEnumerable{T}.GetAsyncEnumerator(CancellationToken)"/> when iterating.</summary> - /// <typeparam name="T">The type of the objects being iterated.</typeparam> - /// <param name="source">The source enumerable being iterated.</param> - /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use.</param> - /// <returns>The configured enumerable.</returns> - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static ConfiguredCancelableAsyncEnumerable<T> WithCancellation<T>( - this IAsyncEnumerable<T> source, CancellationToken cancellationToken) => - new ConfiguredCancelableAsyncEnumerable<T>(source, continueOnCapturedContext: true, cancellationToken); } } |