From 3ee0e266bc8f9b368826d32af6e37f35a9c4bdf0 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 16 May 2019 15:53:45 -0700 Subject: [PATCH] Add [EnumeratorCancellation] to Microsoft.Bcl.AsyncInterfaces (dotnet/corefx#37719) Commit migrated from https://github.com/dotnet/corefx/commit/52c6527b80062c2a3a906fd3d01881ff2f36f405 --- .../ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs | 1 + .../ref/Microsoft.Bcl.AsyncInterfaces.cs | 5 +++++ .../src/Microsoft.Bcl.AsyncInterfaces.csproj | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs b/src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs index 11b1549..1d2d2cc 100644 --- a/src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs +++ b/src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs @@ -9,5 +9,6 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredAsyncDisposable))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.EnumeratorCancellationAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskAsyncEnumerableExtensions))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<>))] diff --git a/src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs b/src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs index 2bcebe3..14e60e0 100644 --- a/src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs +++ b/src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs @@ -62,6 +62,11 @@ namespace System.Runtime.CompilerServices public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable MoveNextAsync() { throw null; } } } + [System.AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false)] + public sealed class EnumeratorCancellationAttribute : System.Attribute + { + public EnumeratorCancellationAttribute() { } + } } namespace System.Threading.Tasks { diff --git a/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj b/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj index 7103294..2a076b6 100644 --- a/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj +++ b/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj @@ -28,6 +28,9 @@ ProductionCode\Common\CoreLib\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs + + ProductionCode\System.Runtime\src\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs + -- 2.7.4