StoreContext.GetUserCollectionWithPagingAsync(IIterable<String>, UInt32) StoreContext.GetUserCollectionWithPagingAsync(IIterable<String>, UInt32) StoreContext.GetUserCollectionWithPagingAsync(IIterable<String>, UInt32) StoreContext.GetUserCollectionWithPagingAsync(IIterable<String>, UInt32) StoreContext.GetUserCollectionWithPagingAsync(IIterable<String>, UInt32) Method

Definition

Gets Microsoft Store info for the add-ons of the current app for which the user has purchased. This method supports paging to return the results.

public : IAsyncOperation<StoreProductPagedQueryResult> GetUserCollectionWithPagingAsync(IIterable<Platform::String> productKinds, unsigned int maxItemsToRetrievePerPage)
IAsyncOperation<StoreProductPagedQueryResult> GetUserCollectionWithPagingAsync(IIterable<winrt::hstring> productKinds, uint32_t maxItemsToRetrievePerPage) const;
public IAsyncOperation<StoreProductPagedQueryResult> GetUserCollectionWithPagingAsync(IEnumerable<String> productKinds, UInt32 maxItemsToRetrievePerPage)
Public Function GetUserCollectionWithPagingAsync(productKinds As IEnumerable(Of String), maxItemsToRetrievePerPage As UInt32) As IAsyncOperation(Of StoreProductPagedQueryResult)
Windows.Services.Store.StoreContext.getUserCollectionWithPagingAsync(productKinds, maxItemsToRetrievePerPage).done( /* Your success and error handlers */ );

Parameters

productKinds
IEnumerable<String> IEnumerable<String> IEnumerable<String>

An array of strings that specify the types of add-ons for which you want to retrieve info. For a list of the supported string values, see the ProductKind property.

maxItemsToRetrievePerPage
UInt32 UInt32 UInt32

The maximum number of add-ons to return in each page of results.

Returns

An asynchronous operation that, on successful completion, returns a StoreProductPagedQueryResult object that provides access to the Microsoft Store info for the add-ons of the current app for which the user has purchased and relevant error info, as well as the next page of results.

Remarks

This method is similar to GetUserCollectionAsync, with the difference that it enables you to use paging to retrieve the add-ons. For more information about using GetUserCollectionAsync, including a code example, see Get product info for apps and add-ons.

Use the HasMoreResults of the StoreProductPagedQueryResult object to determine whether there are additional pages of results, and use the GetNextAsync method to get the next page of results.

If the current user is not signed in to the Store, the ExtendedError property of the StoreProductPagedQueryResult return value will return the error code 0x80070525 (ERROR_NO_SUCH_USER).

Note

Always use HasMoreResults to determine if there are more pages available, even if the current page of data contains fewer items than maxItemsToRetrievePerPage. To provide faster results, the service can return fewer items in a page than maxItemsToRetrievePerPage even if there are more pages of data available.