Open
Description
Method that returns System.Collections.Generic.IAsyncEnumerator<out T>
is called Get**Async**Enumerator
thus code sample
int num = 0;
var enumerator = runPagedQueryAsync(client, PagedIssueQuery, "docs").GetEnumeratorAsync();
try
{
while (await enumerator.MoveNextAsync())
{
var issue = enumerator.Current;
Console.WriteLine(issue);
Console.WriteLine($"Received {++num} issues in total");
}
} finally
{
if (enumerator != null)
await enumerator.DisposeAsync();
}
is wrong – is states GetEnumerator**Async**
like it is usually used for async
methods.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 5ccda011-1ebc-6b53-6943-5bc59bb3baf3
- Version Independent ID: e485041b-52aa-d967-d2a8-b6475fc21884
- Content: Generate and consume async streams
- Content Source: docs/csharp/whats-new/tutorials/generate-consume-asynchronous-stream.md
- Product: dotnet-csharp
- Technology: csharp-async
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn