-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathIAsyncDisposable.xml
96 lines (90 loc) · 6.44 KB
/
IAsyncDisposable.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<Type Name="IAsyncDisposable" FullName="System.IAsyncDisposable">
<TypeSignature Language="C#" Value="public interface IAsyncDisposable" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IAsyncDisposable" FrameworkAlternate="net-5.0;net-6.0;net-7.0;netcore-3.0;netcore-3.1;netstandard-2.1" />
<TypeSignature Language="DocId" Value="T:System.IAsyncDisposable" />
<TypeSignature Language="VB.NET" Value="Public Interface IAsyncDisposable" />
<TypeSignature Language="F#" Value="type IAsyncDisposable = interface" />
<TypeSignature Language="C++ CLI" Value="public interface class IAsyncDisposable" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IAsyncDisposable" FrameworkAlternate="net-8.0;net-9.0;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0" />
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Bcl.AsyncInterfaces</AssemblyName>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
<TypeForwarding From="Microsoft.Bcl.AsyncInterfaces" FromVersion="9.0.0.0" To="netstandard" ToVersion="2.1.0.0" FrameworkAlternate="netstandard-2.1" />
</TypeForwardingChain>
<Interfaces />
<Docs>
<summary>Provides a mechanism for releasing unmanaged resources asynchronously.</summary>
<remarks>For more information about this API, see <see href="/dotnet/fundamentals/runtime-libraries/system-iasyncdisposable">Supplemental API remarks for IAsyncDisposable</see>.</remarks>
</Docs>
<Members>
<Member MemberName="DisposeAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.ValueTask DisposeAsync ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype System.Threading.Tasks.ValueTask DisposeAsync() cil managed" />
<MemberSignature Language="DocId" Value="M:System.IAsyncDisposable.DisposeAsync" />
<MemberSignature Language="VB.NET" Value="Public Function DisposeAsync () As ValueTask" />
<MemberSignature Language="F#" Value="abstract member DisposeAsync : unit -> System.Threading.Tasks.ValueTask" Usage="iAsyncDisposable.DisposeAsync " />
<MemberSignature Language="C++ CLI" Value="public:
 System::Threading::Tasks::ValueTask DisposeAsync();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Bcl.AsyncInterfaces</AssemblyName>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.ValueTask</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Performs application-defined tasks associated with freeing, releasing, or
resetting unmanaged resources asynchronously.
</summary>
<returns>A task that represents the asynchronous dispose operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method to asynchronously close or release unmanaged resources such as files, streams, and handles held by an instance of the class that implements this interface. Using this method instead of <xref:System.IDisposable.Dispose%2A?displayProperty=nameWithType> enables you to perform a resource-intensive dispose operation without blocking the main thread of a GUI application for a long time.
> [!WARNING]
> If you are using a class that implements the <xref:System.IAsyncDisposable> interface, you should call its `DisposeAsync` implementation when you are finished using the class. For more information, see the "Using an object that implements IAsyncDisposable" section in the <xref:System.IAsyncDisposable> topic.
When implementing this method, ensure that all held resources are freed by propagating the call through the containment hierarchy. For example, if an object A allocates an object B, and object B allocates an object C, then A's `DisposeAsync` implementation must call `DisposeAsync` on B, which must in turn call `DisposeAsync` on C. An object must also call the `DisposeAsync` method of its base class if the base class implements <xref:System.IAsyncDisposable>.
If an object's `DisposeAsync` method is called more than once, the object must ignore all calls after the first one and synchronously return a successfully completed <xref:System.Threading.Tasks.ValueTask>. The object must not throw an exception if its `DisposeAsync` method is called multiple times. Instance methods other than `DisposeAsync` can throw an <xref:System.ObjectDisposedException> when resources are already disposed.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>