此主题尚未评级 - 评价此主题

CurrentApp Class

定义您可以用来获取有关当前应用程序的许可和列表信息并执行应用程序内购买的方法和属性。

注意  此对象从 Windows 商店获取其数据,因此,您必须具有 Windows 商店开发人员帐户,并且应用程序必须发布到 Windows 商店中。如果没有 windows 开发人员帐户,则可通过使用 CurrentAppSimulator 测试此类的功能。

语法


var currentApp = Windows.ApplicationModel.Store.CurrentApp;

特性

MarshalingBehaviorAttribute(Agile)
StaticAttribute(Windows.ApplicationModel.Store.ICurrentApp, NTDDI_WIN8)
ThreadingAttribute(Both)
VersionAttribute(NTDDI_WIN8)

成员

CurrentApp类 具有以下类型的成员:

方法

The CurrentApp 类 具有以下方法。 使用 C#、Visual Basic 和 C++,它还可以继承以下内容中的方法 Object 类.

方法描述
GetAppReceiptAsync Requests all receipts for this app and any in-app purchases.
GetProductReceiptAsync Requests the receipt for the productId specified.
LoadListingInformationAsync Loads the app's listing information asynchronously. Implements the IAsyncInfo interface.
RequestAppPurchaseAsync Creates the async operation that enables the user to buy a full license for the current app.
RequestProductPurchaseAsync Creates the async operation that will display the UI that is used to make an in-app purchase from the Windows Store.

 

属性

CurrentApp类 具有以下属性。

属性访问类型描述

AppId

只读The ID of the app that is created by the Windows Store.

LicenseInformation

只读Gets the license metadata for the current app.

LinkUri

只读Gets the Uniform Resource Identifier (URI) of the app's listing page in the web catalog of the Windows Store.

 

备注

此对象从 Windows 应用商店获取其信息。

要求

最低受支持的客户端

Windows 8 [仅 Windows 应用商店应用]

最低受支持的服务器

Windows Server 2012 [仅 Windows 应用商店应用]

最低受支持的电话

Windows Phone 8

命名空间

Windows.ApplicationModel.Store
Windows::ApplicationModel::Store [C++]

元数据

Windows.winmd

 

 

© 2013 Microsoft. 版权所有。