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 (DLC) 套件的可下載內容。

方法

Close()

關閉並釋放此StorePackageLicense所使用的任何資源。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

ReleaseLicense()

(DLC) 套件發行可下載內容的授權。

事件

LicenseLost

當使用者不再擁有目前裝置上授權的許可權 (時引發,例如,使用者已在不同的裝置上取得授權) 。

適用於

另請參閱