ReadOnlyCollectionPageExtensionsGetAllPagesAsyncT Method |
This API is preliminary and subject to change.
Get all pages in a paginated collection.
Namespace: net.openstack.CoreAssembly: openstacknet (in openstacknet.dll) Version: 1.7.7+Branch.master.Sha.25d803f397c8693c2c13777ef6675f796f520f2c
Syntax public static Task<ReadOnlyCollection<T>> GetAllPagesAsync<T>(
this ReadOnlyCollectionPage<T> page,
CancellationToken cancellationToken,
IProgress<ReadOnlyCollectionPage<T>> progress
)
<ExtensionAttribute>
Public Shared Function GetAllPagesAsync(Of T) (
page As ReadOnlyCollectionPage(Of T),
cancellationToken As CancellationToken,
progress As IProgress(Of ReadOnlyCollectionPage(Of T))
) As Task(Of ReadOnlyCollection(Of T))
public:
[ExtensionAttribute]
generic<typename T>
static Task<ReadOnlyCollection<T>^>^ GetAllPagesAsync(
ReadOnlyCollectionPage<T>^ page,
CancellationToken cancellationToken,
IProgress<ReadOnlyCollectionPage<T>^>^ progress
)
[<ExtensionAttribute>]
static member GetAllPagesAsync :
page : ReadOnlyCollectionPage<'T> *
cancellationToken : CancellationToken *
progress : IProgress<ReadOnlyCollectionPage<'T>> -> Task<ReadOnlyCollection<'T>>
Parameters
- page
- Type: net.openstack.Core.CollectionsReadOnlyCollectionPageT
The first page in the collection. - cancellationToken
- Type: System.ThreadingCancellationToken
The CancellationToken that the task will observe. - progress
- Type: SystemIProgressReadOnlyCollectionPageT
An optional callback object to receive progress notifications. If this is , no progress notifications are sent.
Type Parameters
- T
- The type of elements in the collection.
Return Value
Type:
TaskReadOnlyCollectionT
A
Task object representing the asynchronous operation. When the operation
completes successfully, the
Result property will contain a
read-only collection containing the complete set of results from the paginated collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ReadOnlyCollectionPageT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Remarks
If
progress is non-
, the first call to
Report(T) will specify the
page
argument. After each task to obtain to the next page of results completes,
the
Report(T) method will be called again with the
new page of results.
This method determines that the end of the collection is reached when either of
the following conditions is true.
Version Information .NET Framework
Supported in: 4.5
openstack.net
Supported in: 1.6, 1.5, 1.4
See Also