StorePackageLicense 类

定义

提供当前应用的可下载内容的许可证信息 (DLC) 包。

public ref class StorePackageLicense sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Services.Store.StoreContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class StorePackageLicense final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Services.Store.StoreContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class StorePackageLicense : System.IDisposable
Public NotInheritable Class StorePackageLicense
Implements IDisposable
继承
Object Platform::Object IInspectable StorePackageLicense
属性
实现

Windows 要求

设备系列
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
API contract
Windows.Services.Store.StoreContract (在 v1.0 中引入)

注解

StoreAcquireLicenseResult.StorePackageLicense 属性返回此类型的对象。

注意

DLC) 包 (可下载的内容并不适用于所有开发人员帐户。

属性

IsValid

获取一个值,该值指示许可证是否有效。

Package

获取与许可证关联的 DLC) 包 (可下载的内容。

方法

Close()

关闭并释放此 StorePackageLicense 使用的任何资源。

Dispose()

执行与释放或重置非托管资源关联的应用程序定义的任务。

ReleaseLicense()

释放 DLC) 包 (可下载内容的许可证。

事件

LicenseLost

例如,当用户在当前设备上不再拥有许可证的权限时引发 (,用户已在其他设备上获取许可证) 。

适用于

另请参阅