Skip to content

Commit f1d2be8

Browse files
authored
Add docs for AsyncInterfaces (#88432)
1 parent 9bda919 commit f1d2be8

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.0;$(NetFrameworkMinimum);netstandard2.1</TargetFrameworks>
4-
<!-- Public API not fully documented. -->
5-
<NoWarn>$(NoWarn);1591</NoWarn>
64
<IsPackable>true</IsPackable>
75
<!-- This assembly should never be placed inbox as it is only for downlevel compatibility. -->
86
<PackageDescription>Provides the IAsyncEnumerable&lt;T&gt; and IAsyncDisposable interfaces and helper types for .NET Standard 2.0. This package is not required starting with .NET Standard 2.1 and .NET Core 3.0.

src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ internal ConfiguredAsyncDisposable(IAsyncDisposable source, bool continueOnCaptu
1818
_continueOnCapturedContext = continueOnCapturedContext;
1919
}
2020

21+
/// <summary>Asynchronously releases the unmanaged resources used by the <see cref="T:System.Runtime.CompilerServices.ConfiguredAsyncDisposable" />.</summary>
22+
/// <returns>A task that represents the asynchronous dispose operation.</returns>
2123
public ConfiguredValueTaskAwaitable DisposeAsync() =>
2224
// as with other "configured" awaitable-related type in CompilerServices, we don't null check to defend against
2325
// misuse like `default(ConfiguredAsyncDisposable).DisposeAsync()`, which will null ref by design.

src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait(bool continueOnCapt
3636
public ConfiguredCancelableAsyncEnumerable<T> WithCancellation(CancellationToken cancellationToken) =>
3737
new ConfiguredCancelableAsyncEnumerable<T>(_enumerable, _continueOnCapturedContext, cancellationToken);
3838

39+
/// <summary>Returns an enumerator that iterates asynchronously through collections that enables cancelable iteration and configured awaits.</summary>
40+
/// <returns>An enumerator for the <see cref="T:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1" /> class.</returns>
3941
public Enumerator GetAsyncEnumerator() =>
4042
// as with other "configured" awaitable-related type in CompilerServices, we don't null check to defend against
4143
// misuse like `default(ConfiguredCancelableAsyncEnumerable<T>).GetAsyncEnumerator()`, which will null ref by design.

src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/EnumeratorCancellationAttribute.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33

44
namespace System.Runtime.CompilerServices
55
{
6+
/// <summary>Allows users of async-enumerable methods to mark the parameter that should receive the cancellation token value from <see cref="M:System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator(System.Threading.CancellationToken)" />.</summary>
67
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
78
public sealed class EnumeratorCancellationAttribute : Attribute
89
{
10+
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.EnumeratorCancellationAttribute" /> class.</summary>
911
public EnumeratorCancellationAttribute()
1012
{
1113
}

0 commit comments

Comments
 (0)