Share via


StoreContext.GetStoreProductsAsync Method

Definition

Overloads

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

Gets Microsoft Store listing info for the specified products that are associated with the current app.

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

Gets Microsoft Store listing info for the specified products that are associated with the current app, with the option to use a filter for the query.

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

Gets Microsoft Store listing info for the specified products that are associated with the current app.

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)

Parameters

productKinds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

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

storeIds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

An array of the Store ID strings for the products for which you want to retrieve listing info.

Returns

An asynchronous operation that, on successful completion, returns a StoreProductQueryResult object that contains listing info for the specified products and any relevant error info.

Attributes

Remarks

This method returns listing info for the specified products that are associated with the current app, regardless of whether the products are currently available for purchase within the current app. To retrieve info for all the products that can currently be purchased from within the current app, use the GetStoreProductsAsync overload or the GetAssociatedStoreProductsAsync method instead.

The Store ID for a product is available in Partner Center, and it also is returned by the StoreId property of the StoreProduct that represents the product. For more information, see Store IDs.

For more information about using this method, including a code example, see Get product info for apps and add-ons.

See also

Applies to

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

Gets Microsoft Store listing info for the specified products that are associated with the current app, with the option to use a filter for the query.

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)

Parameters

productKinds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

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

storeIds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

An array of the Store ID strings for the products for which you want to retrieve listing info.

storeProductOptions
StoreProductOptions

An object that contains a filter that will be used for the query.

Returns

An asynchronous operation that, on successful completion, returns a StoreProductQueryResult object that contains listing info for the specified products and any relevant error info.

Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Services.Store.StoreContract (introduced in v3.0)

Remarks

To return info only for products that can currently be purchased from within the current app, add the Purchase filter string to the ActionFilters property of the object you pass to the storeProductOptions parameter. To get info for all the specified products that are associated with the current app, regardless of whether they are currently available for purchase, use the GetStoreProductsAsync overload instead.

The Store ID for a product is available in Partner Center, and it also is returned by the StoreId property of the StoreProduct that represents the product. For more information, see Store IDs.

For more information about using this method, including a code example, see Get product info for apps and add-ons.

See also

Applies to