O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Abstracting the LicenseInformation Class

The downloadable sample code includes a custom ILicenseService interface, which contains a single property called Trial, indicating the trial state of the app. There are two implementations of this interface: one for testing and one for production.

The production implementation named LicensingService wraps a LicenseInformation instance, as shown in the following excerpt:

public class LicensingService : ILicensingService{    public bool Trial    {        get        {            LicenseInformation licenseInformation                                    = new LicenseInformation();            return licenseInformation.IsTrial();        }    }}

During development and testing, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required