语言

StoreContext.GetStoreProductsAsync 方法

定义

重载

名称 说明
GetStoreProductsAsync(IIterable<String>, IIterable<String>)

获取与当前应用关联的指定产品的Microsoft应用商店一览信息。

GetStoreProductsAsync(IIterable<String>, IIterable<String>, StoreProductOptions)

获取Microsoft与当前应用关联的指定产品的 Microsoft Store 一览信息,以及使用查询筛选器的选项。

GetStoreProductsAsync(IIterable<String>, IIterable<String>)

获取与当前应用关联的指定产品的Microsoft应用商店一览信息。

public:
 virtual IAsyncOperation<StoreProductQueryResult ^> ^ GetStoreProductsAsync(IIterable<Platform::String ^> ^ productKinds, IIterable<Platform::String ^> ^ storeIds) = GetStoreProductsAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StoreProductQueryResult> GetStoreProductsAsync(IIterable<winrt::hstring> const& productKinds, IIterable<winrt::hstring> const& storeIds);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StoreProductQueryResult> GetStoreProductsAsync(IEnumerable<string> productKinds, IEnumerable<string> storeIds);
function getStoreProductsAsync(productKinds, storeIds)
Public Function GetStoreProductsAsync (productKinds As IEnumerable(Of String), storeIds As IEnumerable(Of String)) As IAsyncOperation(Of StoreProductQueryResult)

参数

productKinds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

一个字符串数组,用于指定要检索其列表信息的产品类型。 有关支持的字符串值的列表,请参阅 ProductKind 属性。

storeIds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

要检索其列表信息的产品的 Microsoft Store ID 字符串数组。

返回

成功完成后,异步操作将返回一个 StoreProductQueryResult 对象,该对象包含指定产品和任何相关错误信息的列表信息。

属性

注解

此方法返回与当前应用关联的指定产品的列表信息,而不考虑当前应用当前是否可供购买。 若要检索当前可从当前应用中购买的所有产品的信息,请改用 GetStoreProductsAsync 重载或 GetAssociatedStoreProductsAsync 方法。

产品的 Microsoft Store ID 在 合作伙伴中心中提供,它还 由代表产品的 Store Product 属性返回。 有关详细信息,请参阅 存储 ID。

有关使用此方法的详细信息(包括代码示例)请参阅 获取应用和加载项的产品信息。

另请参阅

适用于

GetStoreProductsAsync(IIterable<String>, IIterable<String>, StoreProductOptions)

获取Microsoft与当前应用关联的指定产品的 Microsoft Store 一览信息,以及使用查询筛选器的选项。

public:
 virtual IAsyncOperation<StoreProductQueryResult ^> ^ GetStoreProductsAsync(IIterable<Platform::String ^> ^ productKinds, IIterable<Platform::String ^> ^ storeIds, StoreProductOptions ^ storeProductOptions) = GetStoreProductsAsync;
/// [Windows.Foundation.Metadata.Overload("GetStoreProductsWithOptionsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StoreProductQueryResult> GetStoreProductsAsync(IIterable<winrt::hstring> const& productKinds, IIterable<winrt::hstring> const& storeIds, StoreProductOptions const& storeProductOptions);
[Windows.Foundation.Metadata.Overload("GetStoreProductsWithOptionsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StoreProductQueryResult> GetStoreProductsAsync(IEnumerable<string> productKinds, IEnumerable<string> storeIds, StoreProductOptions storeProductOptions);
function getStoreProductsAsync(productKinds, storeIds, storeProductOptions)
Public Function GetStoreProductsAsync (productKinds As IEnumerable(Of String), storeIds As IEnumerable(Of String), storeProductOptions As StoreProductOptions) As IAsyncOperation(Of StoreProductQueryResult)

参数

productKinds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

一个字符串数组,用于指定要检索其列表信息的产品类型。 有关支持的字符串值的列表,请参阅 ProductKind 属性。

storeIds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

要检索其列表信息的产品的 Microsoft Store ID 字符串数组。

storeProductOptions
StoreProductOptions

包含将用于查询的筛选器的对象。

返回

成功完成后,异步操作将返回一个 StoreProductQueryResult 对象,该对象包含指定产品和任何相关错误信息的列表信息。

属性

Windows 要求

要求 说明
设备系列
Windows 10, version 1803 (在 10.0.17134.0 中引入)
API contract
Windows.Services.Store.StoreContract (在 v3.0 中引入)

注解

若要仅返回当前可从当前应用内购买的产品的信息,请将 Purchase 筛选器字符串添加到传递给 storeProductOptions 参数的对象 ActionFilters 属性。 若要获取与当前应用关联的所有指定产品的信息,无论它们当前是否可供购买,请改用 GetStoreProductsAsync 重载。

产品的 Microsoft Store ID 在 合作伙伴中心中提供,它还 由代表产品的 Store Product 属性返回。 有关详细信息,请参阅 存储 ID。

有关使用此方法的详细信息(包括代码示例)请参阅 获取应用和加载项的产品信息。

另请参阅

适用于