Share via


StoreLicense 類別

定義

提供與目前應用程式相關聯之永久性附加元件的授權資訊。

public ref class StoreLicense 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 StoreLicense 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 StoreLicense
Public NotInheritable Class StoreLicense
繼承
Object Platform::Object IInspectable StoreLicense
屬性

Windows 需求

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

備註

若要擷取目前應用程式的持久附加元件的 StoreLicense 物件,請使用 StoreAppLicense.AddOnLicenses 屬性。 此屬性只包含仍然有效的附加元件授權,並提供目前使用者使用附加元件的權利。 當附加元件授權過期或已過期時,將無法再于 StoreAppLicense.AddOnLicenses 集合中使用。

屬性

ExpirationDate

取得附加元件授權的到期日期和時間。

ExtendedJsonData

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

InAppOfferToken

取得附加元件的產品識別碼。

IsActive

此屬性保留供日後使用,且不適合在目前版本中使用。 目前,它一律會傳回 true。

SkuStoreId

從 Microsoft Store 目錄取得授權附加元件 SKU 的市集識別碼。

適用於