語言

StoreAppLicense 類別

定義

提供目前應用程式的授權資訊,包括該應用程式所提供的產品的授權。

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
繼承
Object Platform::Object IInspectable StoreAppLicense
屬性

Windows 需求

規格需求 Description
裝置系列
Windows 10 Anniversary Edition (已於 10.0.14393.0 引進)
API contract
Windows.Services.Store.StoreContract (已於 v1.0 引進)

備註

StoreContext.GetAppLicenseAsync 方法回傳此類型的物件。

版本歷程記錄

Windows版本 SDK 版本 附加價值
1809 17763 IsDisc授權

屬性

名稱 Description
AddOnLicenses

取得用戶有權限使用的耐用附加元件授權集合。 此物業不包含消耗性附加元件的授權。

ExpirationDate

會取得應用程式授權的到期日和時間。

ExtendedJsonData

取得完整的授權資料,格式為 JSON。

IsActive

會得到一個值,表示授權是否有效,並給予目前使用者使用該應用程式的權利。

IsDiscLicense

會得到一個值,表示目前授權是否是從光碟安裝取得的。

IsTrial

會有一個值,表示該執照是否為試用執照。

IsTrialOwnedByThisUser

會獲得一個值,顯示目前使用者是否擁有與此應用程式授權相關的使用限制試用的權利。

SkuStoreId

從 Microsoft Store 目錄取得授權應用程式 SKU 的商店 ID。

TrialTimeRemaining

會獲得與此應用程式授權相關的有限使用試用剩餘時間。

TrialUniqueId

會獲得一個唯一 ID,用來識別目前使用者與與此應用程式授權相關的有限使用試用的組合。

適用於