CurrentApp Class

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

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

语法

Public NotInheritable Class CurrentApp

特性

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

成员

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.
GetUnfulfilledConsumablesAsync Returns a list of purchased consumables that have not been fulfilled.
LoadListingInformationAsync Loads the app's listing information asynchronously. Implements the IAsyncInfo interface.
ReportConsumableFulfillmentAsync Notifies the Windows Store that the purchase of a consumable is fulfilled and that the user has the right to access the content.
RequestAppPurchaseAsync Creates the async operation that enables the user to buy a full license for the current app.
RequestProductPurchaseAsync(String) Creates the async operation that displays the UI that is used to simulate an in-app purchase of content or a feature from the Windows Store.
RequestProductPurchaseAsync(String, Boolean) Creates the async operation that displays the UI that is used to simulate an in-app purchase of content or a feature from the Windows Store.
RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) Creates the async operation that displays the UI that is used to simulate an in-app purchase of content or a feature from the Windows Store.

 

属性

CurrentApp类 具有这些属性。

属性访问类型说明

AppId

只读Gets the GUID generated by the Windows Store when your app has been certified for listing in the Windows Store catalog.

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

另请参见

试用版应用程序和应用程序内购买的示例

 

 

显示:
© 2014 Microsoft