LicenseInformation クラス

定義

現在のアプリのライセンス メタデータへのアクセスを提供します。

public ref class LicenseInformation sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class LicenseInformation final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class LicenseInformation
Public NotInheritable Class LicenseInformation
継承
Object Platform::Object IInspectable LicenseInformation
属性

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)

注釈

アプリの試用版のアプリの場合、 IsActive は試用版の有効期限が切れていない限り true を返します。 試用期間中、 IsTrial は true を返します。顧客が完全なバージョンのアプリにアップグレードすると false が返されます。

このオブジェクトには、テスト中に CurrentAppSimulator オブジェクトの LicenseInformation プロパティを使用するか、Microsoft Store を介してアプリを配布するときに CurrentApp オブジェクトの LicenseInformation プロパティを使用してアクセスします。

Note

CurrentApp オブジェクトは、Microsoft Store からデータを取得します。これには、Microsoft Store 開発者アカウントがあり、アプリが Microsoft Store で公開されている必要があります。 Microsoft Store 開発者アカウントをお持ちでない場合は、 CurrentAppSimulator を使用してこのクラスの関数をテストできます。

プロパティ

ExpirationDate

システム クロックに対するライセンスの有効期限の日付と時刻を取得します。

IsActive

ライセンスがアクティブかどうかを示す値を取得します。

IsTrial

ライセンスが試用版ライセンスであるかどうかを示す値を取得します。

ProductLicenses

ユーザーが現在権利を持っているアプリ内製品のライセンスの連想リストを取得します。

イベント

LicenseChanged

アプリのライセンスの状態が変更されたときに通知イベントを発生させます。

適用対象

こちらもご覧ください