StoreContext.FindStoreProductForPackageAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets Store product details for the app or add-on that is associated with the specified package.
public:
virtual IAsyncOperation<StoreProductResult ^> ^ FindStoreProductForPackageAsync(IIterable<Platform::String ^> ^ productKinds, Package ^ package) = FindStoreProductForPackageAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StoreProductResult> FindStoreProductForPackageAsync(IIterable<winrt::hstring> const& productKinds, Package const& package);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StoreProductResult> FindStoreProductForPackageAsync(IEnumerable<string> productKinds, Package package);
function findStoreProductForPackageAsync(productKinds, package)
Public Function FindStoreProductForPackageAsync (productKinds As IEnumerable(Of String), package As Package) As IAsyncOperation(Of StoreProductResult)
Parameters
An array of strings that specify the types of Store products that might be associated with the package. For a list of the supported string values, see the ProductKind property.
- package
- Package
A Package that represents the package for which you want to get the corresponding Store product details.
Returns
An asynchronous operation that, on successful completion, returns a StoreProductResult object. Use the Product property of this object to access a StoreProduct that contains Store product details for the specified package.
- Attributes
Windows requirements
Device family |
Windows 10 Creators Update (introduced in 10.0.15063.0)
|
API contract |
Windows.Services.Store.StoreContract (introduced in v2.0)
|
Remarks
Use this method to get Store product details (such as the Store ID) for a package that is associated with the current app or an add-on for the current app. This method may return errors if the package is not associated with the current app, the current device is offline, or if the current app was not installed from the Store (for example, if the app was sideloaded). In these cases, you can examine the ExtendedError property of the StoreProductResult return object to get more details about the error.