Add [EnumeratorCancellation] to Microsoft.Bcl.AsyncInterfaces (dotnet/corefx#37719)
authorStephen Toub <stoub@microsoft.com>
Thu, 16 May 2019 22:53:45 +0000 (15:53 -0700)
committerGitHub <noreply@github.com>
Thu, 16 May 2019 22:53:45 +0000 (15:53 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/52c6527b80062c2a3a906fd3d01881ff2f36f405

src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs
src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs
src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj

index 11b1549..1d2d2cc 100644 (file)
@@ -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<>))]
index 2bcebe3..14e60e0 100644 (file)
@@ -62,6 +62,11 @@ namespace System.Runtime.CompilerServices
             public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<bool> MoveNextAsync() { throw null; }
         }
     }
+    [System.AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false)]
+    public sealed class EnumeratorCancellationAttribute : System.Attribute
+    {
+        public EnumeratorCancellationAttribute() { }
+    }
 }
 namespace System.Threading.Tasks
 {
index 7103294..2a076b6 100644 (file)
@@ -28,6 +28,9 @@
     <Compile Include="$(CommonPath)\CoreLib\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs">
       <Link>ProductionCode\Common\CoreLib\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs</Link>
     </Compile>
+    <Compile Include="..\..\System.Runtime\src\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs">
+      <Link>ProductionCode\System.Runtime\src\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs</Link>
+    </Compile>
   </ItemGroup>
   <ItemGroup Condition="'$(TargetGroup)' == 'netstandard'">
     <Reference Include="System.Runtime" />