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,然后获取应用提供的功能之一的 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

获取与用户市场关联的货币代码,例如 USDCAD

CurrentMarket

获取与用户位置(例如 美国CA)关联的国家/地区代码,该代码用于标识当前会话中的交易市场。

Description

获取应用在当前市场中的说明。

FormattedBasePrice

获取为当前市场和货币设置格式的应用基价。

FormattedPrice

获取按当前市场和货币设置格式的应用购买价格。

IsOnSale

获取一个值,该值指示应用是否处于销售中。

Name

获取当前市场中应用的名称。

ProductListings

获取有关加载项的信息 (也称为应用内产品或 IAP) 可供购买。

SaleEndDate

获取应用的销售期的结束日期。

适用于

另请参阅