Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.53 KB

productlicense.md

File metadata and controls

34 lines (25 loc) · 1.53 KB
-api-id -api-type
T:Windows.ApplicationModel.Store.ProductLicense
winrt class

Windows.ApplicationModel.Store.ProductLicense

-description

Provides info about a license that is associated with an add-on (also called an in-app product or IAP).

-remarks

The ProductLicenses property of the LicenseInformation object contains one or more instances of this object.

-examples

The following code example demonstrates how to use this object to get the expiration date of an add-on offer.

// 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;

-see-also

Store sample, Trial app and in-app purchase sample, Enable in-app product purchases