Add IAsyncDisposable
authorStephen Toub <stoub@microsoft.com>
Tue, 16 Oct 2018 01:18:18 +0000 (21:18 -0400)
committerStephen Toub <stoub@microsoft.com>
Fri, 26 Oct 2018 04:02:40 +0000 (21:02 -0700)
src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
src/System.Private.CoreLib/shared/System/IAsyncDisposable.cs [new file with mode: 0644]

index 3b74957237edcfea49ba01f8b351ddbabeeea264..25b0dbb31e9324cb137b2d9697c89e55ccf9a8a9 100644 (file)
     <Compile Include="$(MSBuildThisFileDirectory)System\Guid.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\HashCode.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\HResults.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\IAsyncDisposable.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\IAsyncResult.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\ICloneable.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\IComparable.cs" />
diff --git a/src/System.Private.CoreLib/shared/System/IAsyncDisposable.cs b/src/System.Private.CoreLib/shared/System/IAsyncDisposable.cs
new file mode 100644 (file)
index 0000000..c29f549
--- /dev/null
@@ -0,0 +1,18 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Threading.Tasks;
+
+namespace System
+{
+    /// <summary>Provides a mechanism for releasing unmanaged resources asynchronously.</summary>
+    public interface IAsyncDisposable
+    {
+        /// <summary>
+        /// Performs application-defined tasks associated with freeing, releasing, or
+        /// resetting unmanaged resources asynchronously.
+        /// </summary>
+        ValueTask DisposeAsync();
+    }
+}