LicenseSpring .Net SDK 7.32.1
Easily add Software Licensing to your application
Loading...
Searching...
No Matches
LicenseSpring.BaseManager Class Reference

Base class for License management. More...

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

Public Member Functions

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

Properties

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

Detailed Description

Base class for License management.

Inherited by LicenseManager and FloatingClient

Member Function Documentation

◆ ClearLocalStorage()

void LicenseSpring.BaseManager.ClearLocalStorage ( )

Removes the license file, license log and folders created by the SDK.

Typically should be called after license deactivation in the app uninstaller.

Exceptions
System.InvalidOperationExceptionThrown if the license manager is not initialized.

◆ CurrentLicense()

ILicense LicenseSpring.BaseManager.CurrentLicense ( )

Load license from local storage (if not yet loaded).

If license was already loaded this method returns an existing license object.

Returns
License object or null if no license exists for current configuration.
Exceptions
System.InvalidOperationExceptionThrown if license manager is not initialized.
LicenseSpring.LocalLicenseExceptionThrown if the local license can't be loaded.

◆ Initialize()

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

Initialize license manager with the given configuration.

Parameters
configurationConfiguration object used to initialize the manager.
storageStorage for local license, uses local license file by default.
Exceptions
System.ArgumentNullExceptionConfiguration is null.

◆ IsInitialized()

bool LicenseSpring.BaseManager.IsInitialized ( )

Check whether license manager has been initialized.

Returns
True if license manager has been initialized and is ready to use, 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 the local storage.

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

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 it 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: