ListingInformation 類別

定義

提供描述 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
繼承
Object Platform::Object IInspectable ListingInformation
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

此程式碼範例示範如何從模擬的應用程式資料取得 ListingInformation,然後取得 App 所提供其中一項功能的 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

取得與使用者市場相關聯的貨幣代碼,例如 美元CAD

CurrentMarket

取得與使用者位置相關聯的國家/地區代碼,例如 美國CA,用來識別其在目前會話中交易的市場。

Description

取得目前市場的應用程式描述。

FormattedBasePrice

取得針對目前市場和貨幣格式化的應用程式基本價格。

FormattedPrice

取得針對目前市場和貨幣格式化的應用程式購買價格。

IsOnSale

取得值,這個值表示應用程式是否正在銷售。

Name

取得目前市場的應用程式名稱。

ProductListings

取得附加元件的相關資訊, (也稱為應用程式內產品或 IAP) 可供購買。

SaleEndDate

取得應用程式的銷售期間結束日期。

適用於

另請參閱