A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/api/azure.asyncpageable-1 below:

AsyncPageable<T> Class (Azure) - Azure for .NET Developers

AsyncPageable<T> Class Definition

A collection of values that may take multiple service requests to iterate over.

public abstract class AsyncPageable<T> : System.Collections.Generic.IAsyncEnumerable<T>
type AsyncPageable<'T> = class
    interface IAsyncEnumerable<'T>
Public MustInherit Class AsyncPageable(Of T)
Implements IAsyncEnumerable(Of T)
Type Parameters
T

The type of the values.

Inheritance
Implements
Examples

Example of enumerating an AsyncPageable using the async foreach loop:

// call a service method, which returns AsyncPageable<T>
AsyncPageable<SecretProperties> allSecretProperties = client.GetPropertiesOfSecretsAsync();

await foreach (SecretProperties secretProperties in allSecretProperties)
{
    Console.WriteLine(secretProperties.Name);
}

or using a while loop:

// call a service method, which returns AsyncPageable<T>
AsyncPageable<SecretProperties> allSecretProperties = client.GetPropertiesOfSecretsAsync();

IAsyncEnumerator<SecretProperties> enumerator = allSecretProperties.GetAsyncEnumerator();
try
{
    while (await enumerator.MoveNextAsync())
    {
        SecretProperties secretProperties = enumerator.Current;
        Console.WriteLine(secretProperties.Name);
    }
}
finally
{
    await enumerator.DisposeAsync();
}
Constructors Properties Methods

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4