LicenseSpring .Net SDK 7.22.0
Easily add Software Licensing to your application
LicenseSpring.BaseManager Class Reference

Base class for License management More...

Inheritance diagram for LicenseSpring.BaseManager:
LicenseSpring.FloatingClient LicenseSpring.LicenseManager

Public Member Functions

void ClearLocalStorage ()
 Remove license file, license log if present and folders created by the SDK More...
 
ILicense CurrentLicense ()
 Load license from local storage (if not yet loaded) More...
 
void Initialize (Configuration configuration, ILicenseStorage storage=null)
 Initialize license manager with given configuration More...
 
bool IsInitialized ()
 Check whether license manager has been initialized More...
 
string LicenseFilePath ()
 Returns full path to the license file, meaningful only if LicenseFileStorage (or derived) is used More...
 
ILicense ReloadLicense ()
 Resets current license and loads it again from local storage More...
 

Properties

string DataLocation [get, set]
 Folder path where LicenseSpring data is being stored More...
 
string LicenseFileName [get, set]
 License filename with extension (optional), meaningful only if LicenseFileStorage is used More...
 

Detailed Description

Base class for License management

Inherited by LicenseManager and FloatingClient

Member Function Documentation

◆ ClearLocalStorage()

void LicenseSpring.BaseManager.ClearLocalStorage ( )

Remove license file, license log if present and folders created by the SDK

Typically should be called after license deactivation in app uninstaller

Exceptions
System.InvalidOperationExceptionThrown when license manager is not initialized

◆ CurrentLicense()

ILicense LicenseSpring.BaseManager.CurrentLicense ( )

Load license from local storage (if not yet loaded)

If license has been already loaded this method just returns existing license object.

Returns
License object or null if no license exists for current configuration
Exceptions
System.InvalidOperationExceptionThrown when license manager is not initialized
LicenseSpring.LocalLicenseExceptionThrown when couldn't load local license

◆ Initialize()

void LicenseSpring.BaseManager.Initialize ( Configuration  configuration,
ILicenseStorage  storage = null 
)

Initialize license manager with given configuration

Parameters
configurationConfiguration object to use
storageStorage for local license, by default local license is saved in a file
Exceptions
System.ArgumentNullExceptionThrown when configuration is null

◆ IsInitialized()

bool LicenseSpring.BaseManager.IsInitialized ( )

Check whether license manager has been initialized

Returns
True if license manager has been initialized and ready to use or false otherwise

◆ LicenseFilePath()

string LicenseSpring.BaseManager.LicenseFilePath ( )

Returns full path to the license file, meaningful only if LicenseFileStorage (or derived) is used

Returns
Absolute path to the license file or null if local storage is not file-based

◆ ReloadLicense()

ILicense LicenseSpring.BaseManager.ReloadLicense ( )

Resets current license and loads it again from local storage

Returns
License object or null if no license exists for current configuration (DataLocation or LicenseFileName)
Exceptions
System.InvalidOperationExceptionThrown when license manager is not initialized
LicenseSpring.LocalLicenseExceptionThrown when couldn't load local license

Property Documentation

◆ DataLocation

string LicenseSpring.BaseManager.DataLocation
getset

Folder path where LicenseSpring data is being stored

Data like log file, temporary files for offline activation and local license file if LicenseFileStorage is used (which is by default). Default data folder path is Environment.SpecialFolder.LocalApplicationData/LicenseSpring/{ProductCode}

◆ LicenseFileName

string LicenseSpring.BaseManager.LicenseFileName
getset

License filename with extension (optional), meaningful only if LicenseFileStorage is used

Default filename is License.key


The documentation for this class was generated from the following file: