C# Class Orc.LicenseManager.Services.LicenseService

Service to validate, store and remove licenses for software products.
Inheritance: ILicenseService
Mostra file Open project: WildGums/Orc.LicenseManager

Public Methods

Method Description
LicenseExists ( LicenseMode licenseMode = LicenseMode.CurrentUser ) : bool

Check if the license exists.

LicenseService ( ILicenseLocationService licenseLocationService ) : System

Initializes a new instance of the LicenseService class.

LoadLicense ( LicenseMode licenseMode = LicenseMode.CurrentUser ) : string

Loads the license.

LoadXmlFromLicense ( string license ) : List

Loads the XML out of license.

RemoveLicense ( LicenseMode licenseMode = LicenseMode.CurrentUser ) : void

Removes the license if exists.

SaveLicense ( string license, LicenseMode licenseMode = LicenseMode.CurrentUser ) : void

Saves the license.

Method Details

LicenseExists() public method

Check if the license exists.
public LicenseExists ( LicenseMode licenseMode = LicenseMode.CurrentUser ) : bool
licenseMode LicenseMode
return bool

LicenseService() public method

Initializes a new instance of the LicenseService class.
public LicenseService ( ILicenseLocationService licenseLocationService ) : System
licenseLocationService ILicenseLocationService The application identifier service.
return System

LoadLicense() public method

Loads the license.
public LoadLicense ( LicenseMode licenseMode = LicenseMode.CurrentUser ) : string
licenseMode LicenseMode
return string

LoadXmlFromLicense() public method

Loads the XML out of license.
public LoadXmlFromLicense ( string license ) : List
license string The license.
return List

RemoveLicense() public method

Removes the license if exists.
public RemoveLicense ( LicenseMode licenseMode = LicenseMode.CurrentUser ) : void
licenseMode LicenseMode
return void

SaveLicense() public method

Saves the license.
The is null or whitespace.
public SaveLicense ( string license, LicenseMode licenseMode = LicenseMode.CurrentUser ) : void
license string The license key that will be saved to Catel.IO.Path.GetApplicationDataDirectory .
licenseMode LicenseMode
return void