PaginationHelper.ForEach<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Perform an action for each page of a paginated response, requesting the next page after the action completes.
public static void ForEach<T> (Func<Microsoft.Rest.Azure.IPage<T>> getFirstPage, Func<string,Microsoft.Rest.Azure.IPage<T>> getNextPage, Action<System.Collections.Generic.IEnumerable<T>> action, int numberOfResults, System.Threading.CancellationToken cancellationToken);
static member ForEach : Func<Microsoft.Rest.Azure.IPage<'T>> * Func<string, Microsoft.Rest.Azure.IPage<'T>> * Action<seq<'T>> * int * System.Threading.CancellationToken -> unit
Public Shared Sub ForEach(Of T) (getFirstPage As Func(Of IPage(Of T)), getNextPage As Func(Of String, IPage(Of T)), action As Action(Of IEnumerable(Of T)), numberOfResults As Integer, cancellationToken As CancellationToken)
Type Parameters
- T
The type of object expected in the response
Parameters
- action
- Action<IEnumerable<T>>
The action to perform on each page.
- numberOfResults
- Int32
The maximum number of results to return.
- cancellationToken
- CancellationToken
The cancellation token.