StoreContext.GetAssociatedStoreProductsWithPagingAsync 方法

定義

取得可從目前應用程式內購買之產品的 Microsoft Store 清單資訊。 這個方法支援分頁以傳回結果。

public:
 virtual IAsyncOperation<StoreProductPagedQueryResult ^> ^ GetAssociatedStoreProductsWithPagingAsync(IIterable<Platform::String ^> ^ productKinds, unsigned int maxItemsToRetrievePerPage) = GetAssociatedStoreProductsWithPagingAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StoreProductPagedQueryResult> GetAssociatedStoreProductsWithPagingAsync(IIterable<winrt::hstring> const& productKinds, uint32_t const& maxItemsToRetrievePerPage);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StoreProductPagedQueryResult> GetAssociatedStoreProductsWithPagingAsync(IEnumerable<string> productKinds, uint maxItemsToRetrievePerPage);
function getAssociatedStoreProductsWithPagingAsync(productKinds, maxItemsToRetrievePerPage)
Public Function GetAssociatedStoreProductsWithPagingAsync (productKinds As IEnumerable(Of String), maxItemsToRetrievePerPage As UInteger) As IAsyncOperation(Of StoreProductPagedQueryResult)

參數

productKinds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

字串陣列,指定您想要取得的產品類型。 如需支援的字串值清單,請參閱 ProductKind 屬性。

maxItemsToRetrievePerPage
UInt32

unsigned int

uint32_t

要在每個結果頁面中傳回的產品數目上限。

傳回

在成功完成時,非同步作業會傳回 StoreProductPagedQueryResult ,提供相關聯產品的存取權、相關的錯誤資訊,以及結果的下一頁。

屬性

備註

這個方法類似于 GetAssociatedStoreProductsAsync,其差異在於它可讓您使用分頁來擷取產品。 如需使用 GetAssociatedStoreProductsAsync的詳細資訊,包括程式碼範例,請參閱 取得應用程式和附加元件的產品資訊

使用StoreProductPagedQueryResult傳回值的HasMoreResults來判斷是否有額外的結果頁面,並使用GetNextAsync方法來取得下一頁的結果。

注意

一律使用 HasMoreResults 來判斷是否有更多頁面可用,即使目前的資料頁面包含的專案少於 maxItemsToRetrievePerPage也一樣。 為了提供更快的結果,即使有更多可用的資料頁面,服務仍可傳回頁面比 maxItemsToRetrievePerPage 少的專案。

適用於

另請參閱