語言

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 需求

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

備註

StoreAcquireLicenseResult.StorePackageLicense 屬性會回傳此類物件。

備註

可下載內容(DLC)套件並非所有開發者帳號都能使用。

屬性

名稱 Description
IsValid

會獲得一個表示授權是否有效的數值。

Package

會獲得與授權相關聯的可下載內容(DLC)包。

方法

名稱 Description
Close()

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

Dispose()

執行與釋放、釋放或重設非受控資源相關聯的應用程式定義工作。

ReleaseLicense()

釋出可下載內容(DLC)套件的授權。

事件

名稱 Description
LicenseLost

當使用者不再擁有目前裝置的授權權利(例如,使用者已在其他裝置取得授權)時提出。

適用於

另請參閱