Share via


ProductLicense 클래스

정의

추가 기능(앱 내 제품 또는 IAP라고도 함)과 연결된 라이선스에 대한 정보를 제공합니다.

public ref class ProductLicense 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 ProductLicense 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 ProductLicense
Public NotInheritable Class ProductLicense
상속
Object Platform::Object IInspectable ProductLicense
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

다음 코드 예제에서는 사용 하는 방법에 설명 합니다 추가 기능 제품의 만료 날짜를이 개체입니다.

// get the license info for this app from the simulator
LicenseInformation licenseInformation = CurrentAppSimulator.LicenseInformation;

// get the license info for one of the app's in-app offers
ProductLicense inAppOfferLicense =
    licenseInformation.ProductLicenses["MyFavoriteInAppOffer"];

// get the expiration date of this in-app offer
DateTimeOffset expirationDate = inAppOfferLicense.ExpirationDate;

설명

LicenseInformation 개체의 ProductLicenses 속성에는 이 개체의 인스턴스가 하나 이상 포함되어 있습니다.

속성

ExpirationDate

추가 기능(앱 내 제품 또는 IAP라고도 함) 라이선스의 현재 만료 날짜 및 시간을 가져옵니다.

IsActive

추가 기능(앱 내 제품 또는 IAP라고도 함) 라이선스가 현재 활성화되어 있는지 여부를 나타냅니다.

IsConsumable

추가 기능(앱 내 제품 또는 IAP라고도 함)이 소모성인지 여부를 나타냅니다. 소모성 추가 기능을 다시 구입, 사용 및 구매할 수 있습니다.

ProductId

추가 기능(앱 내 제품 또는 IAP라고도 함)의 ID를 가져옵니다. 이 ID는 앱에서 고객이 앱에서 바로 구매를 통해 구매할 때 사용하도록 설정된 제품 또는 기능에 대한 정보를 가져오는 데 사용됩니다.

적용 대상

추가 정보