StorePackageLicense 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为当前应用提供可下载内容 (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
- 继承
- 属性
- 实现
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 |
当用户不再有权访问当前设备上的许可证时引发(例如,用户已获取其他设备上的许可证)。 |