StoreContext.FindStoreProductForPackageAsync メソッド

定義

指定したパッケージに関連付けられているアプリまたはアドオンの製品の詳細を格納するを取得します。

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)

パラメーター

productKinds

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

パッケージに関連付けられている可能性がある Store 製品の種類を指定する文字列の配列。 サポートされている文字列値の一覧についてはProductKind プロパティをご覧ください。

package
Package

対応 するストア 製品の詳細を取得する対象のパッケージを表すパッケージ。

戻り値

正常に完了すると StoreProductResult オブジェクトを返す非同期操作。 指定したパッケージの Store 製品 の詳細を含む StoreProduct にアクセスするには、このオブジェクトの Product プロパティを使用します。

属性

Windows の要件

デバイス ファミリ
Windows 10 Creators Update (10.0.15063.0 で導入)
API contract
Windows.Services.Store.StoreContract (v2.0 で導入)

注釈

現在のアプリに関連付けられているパッケージまたは現在のアプリのアドオンのストア製品の詳細 (ストア ID など) を取得するには、このメソッドを使用します。 このメソッドは、パッケージが現在のアプリに関連付けられていない場合、現在のデバイスがオフラインの場合、または現在のアプリがストアからインストールされていない場合 (アプリがサイドロードされた場合など) にエラーを返す可能性があります。 このような場合は、StoreProductResult 戻りオブジェクトの ExtendedError プロパティを調べて、エラーの詳細を取得できます。

適用対象

こちらもご覧ください