ListingInformation クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Microsoft Store のアプリを説明する一覧情報を提供します。
public ref class ListingInformation sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ListingInformation final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ListingInformation
Public NotInheritable Class ListingInformation
- 継承
- 属性
Windows の要件
デバイス ファミリ |
Windows 10 (10.0.10240.0 で導入)
|
API contract |
Windows.Foundation.UniversalApiContract (v1.0 で導入)
|
例
このコード例では、シミュレートされたアプリ データから ListingInformation を取得し、アプリによって提供されるいずれかの機能の ProductListing オブジェクトを 取得する方法を示します。
// get the license info for this app from the simulator
ListingInformation listing = await CurrentAppSimulator.LoadListingInformationAsync();
// get the price of the app from the listing info.
String thisAppsPrice = listing.FormattedPrice;
注釈
このオブジェクトから返される情報は、アプリを Microsoft Store に送信するときに入力した登録情報から取得されます。
このオブジェクトには、テスト中に CurrentAppSimulator オブジェクトの LoadListingInformationAsync メソッドを使用するか、Microsoft Store を介してアプリを配布するときに CurrentApp オブジェクトの LoadListingInformationAsync メソッドを使用してアクセスします。
注意
CurrentApp オブジェクトは Microsoft Store からデータを取得するため、Microsoft Store 開発者アカウントを持っている必要があり、アプリを Microsoft Store で発行する必要があります。 Microsoft Store 開発者アカウントをお持ちでない場合は、 CurrentAppSimulator を使用してこのクラスの関数をテストできます。
バージョン履歴
Windows のバージョン | SDK バージョン | 追加された値 |
---|---|---|
1511 | 10586 | CurrencyCode |
1511 | 10586 | FormattedBasePrice |
1511 | 10586 | IsOnSale |
1511 | 10586 | SaleEndDate |
プロパティ
AgeRating |
アプリの年齢評価を取得します。 |
CurrencyCode |
USD や CAD など、ユーザーの市場に関連付けられている通貨コードを取得します。 |
CurrentMarket |
現在のセッションでのトランザクションの市場を識別するために使用される、ユーザーの場所 ( 米国 や CA など) に関連付けられている国コードを取得します。 |
Description |
現在の市場でのアプリの説明を取得します。 |
FormattedBasePrice |
現在の市場と通貨に対して書式設定されたアプリの基本価格を取得します。 |
FormattedPrice |
現在の市場と通貨に対して書式設定されたアプリの購入価格を取得します。 |
IsOnSale |
アプリが販売されているかどうかを示す値を取得します。 |
Name |
現在の市場のアプリの名前を取得します。 |
ProductListings |
購入可能なアドオン (アプリ内製品または IAP とも呼ばれます) に関する情報を取得します。 |
SaleEndDate |
アプリの販売期間の終了日を取得します。 |