StoreContext.GetStoreProductsAsync 方法

定義

多載

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

取得與目前應用程式相關聯之指定產品的 Microsoft Store 清單資訊。

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

取得與目前應用程式相關聯之指定產品的 Microsoft Store 清單資訊,以及使用查詢篩選的選項。

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

取得與目前應用程式相關聯之指定產品的 Microsoft Store 清單資訊。

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>

您要擷取清單資訊之產品的市集識別碼字串陣列。

傳回

在成功完成時,非同步作業會傳回 StoreProductQueryResult 物件,其中包含指定產品的清單資訊,以及任何相關的錯誤資訊。

屬性

備註

這個方法會傳回與目前應用程式相關聯的指定產品清單資訊,不論產品目前是否可在目前應用程式內購買。 若要擷取目前可從目前應用程式內購買之所有產品的資訊,請改用 GetStoreProductsAsync 多載或 GetAssociatedStoreProductsAsync 方法。

產品的市集識別碼可在合作夥伴中心取得,而且它也會由代表產品的StoreProduct 的 StoreId屬性傳回。 如需詳細資訊,請參閱 存放區識別碼

如需使用此方法的詳細資訊,包括程式碼範例,請參閱 取得應用程式和附加元件的產品資訊

另請參閱

適用於

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

取得與目前應用程式相關聯之指定產品的 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>

您要擷取清單資訊之產品的市集識別碼字串陣列。

storeProductOptions
StoreProductOptions

物件,其中包含將用於查詢的篩選準則。

傳回

在成功完成時,非同步作業會傳回 StoreProductQueryResult 物件,其中包含指定產品的清單資訊,以及任何相關的錯誤資訊。

屬性

Windows 需求

裝置系列
Windows 10, version 1803 (已於 10.0.17134.0 引進)
API contract
Windows.Services.Store.StoreContract (已於 v3.0 引進)

備註

若要只傳回目前可從目前應用程式內購買的產品資訊,請將 Purchase 篩選字串新增至您傳遞至storeProductOptions參數之物件的ActionFilters屬性。 若要取得與目前應用程式相關聯之所有指定產品的資訊,不論它們目前是否可供購買,請改用 GetStoreProductsAsync 多載。

產品的市集識別碼可在合作夥伴中心取得,而且它也會由代表產品的StoreProduct 的 StoreId屬性傳回。 如需詳細資訊,請參閱 存放區識別碼

如需使用此方法的詳細資訊,包括程式碼範例,請參閱 取得應用程式和附加元件的產品資訊

另請參閱

適用於