StoreAppLicense 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供当前应用的许可证信息,包括应用提供的产品的许可证。
public ref class StoreAppLicense sealed
/// [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 StoreAppLicense final
[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 StoreAppLicense
Public NotInheritable Class StoreAppLicense
- 继承
- 属性
Windows 要求
| 设备系列 |
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
|
| API contract |
Windows.Services.Store.StoreContract (在 v1.0 中引入)
|
注解
StoreContext.GetAppLicenseAsync 方法返回此类型的对象。
版本历史记录
| Windows 版本 | SDK 版本 | 增值 |
|---|---|---|
| 1809 | 17763 | IsDiscLicense |
属性
| AddOnLicenses |
获取用户有权使用的持久加载项的许可证集合。 此属性不包括易耗型加载项的许可证。 |
| ExpirationDate |
获取应用许可证的到期日期和时间。 |
| ExtendedJsonData |
获取 JSON 格式的完整许可证数据。 |
| IsActive |
获取一个值,该值指示许可证是否有效,并为当前用户提供使用该应用的权利。 |
| IsDiscLicense |
获取一个值,该值指示当前许可证是否是从基于光盘的安装获取的。 |
| IsTrial |
获取一个值,该值指示许可证是否为试用许可证。 |
| IsTrialOwnedByThisUser |
获取一个值,该值指示当前用户是否具有与此应用许可证关联的使用限制试用版的权利。 |
| SkuStoreId |
从 Microsoft Store 目录中获取许可的应用 SKU 的应用商店 ID。 |
| TrialTimeRemaining |
获取与此应用许可证关联的使用限制试用版的剩余时间。 |
| TrialUniqueId |
获取一个唯一 ID,该 ID 标识当前用户与与此应用许可证关联的使用量限制试用版的组合。 |