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

Class that saves license in a file, implements ILicenseStorage interface. More...

Inheritance diagram for LicenseSpring.LicenseFileStorage:
LicenseSpring.ILicenseStorage LicenseSpring.LicenseFileStorageEx

Public Member Functions

virtual void Clear ()
 Removes local license data.
 
string LicenseFilePath ()
 Returns full path to the license file.
 
 LicenseFileStorage ()
 LicenseFileStorage constructor.
 
 LicenseFileStorage (string licenseFilePath=null)
 LicenseFileStorage constructor.
 
virtual string LoadLicense ()
 Load license from file.
 
virtual void SaveLicense (string licenseData)
 Saves given license data string to the file.
 

Protected Member Functions

void DeleteFile ()
 Delete license file.
 
string LoadFromFile ()
 Read string data from the file.
 
void SaveToFile (string data)
 Write string data to the file.
 

Properties

string LicenseFileName [get, set]
 License filename with extension (optional)
 
string LicenseFolderPath [get, set]
 Folder path where License file is being stored.
 

Detailed Description

Class that saves license in a file, implements ILicenseStorage interface.

This is the default license storage type.

File operations of this class is thread safe.

If you intend to use many instances of your application simultaneously please use LicenseFileStorageEx.

Constructor & Destructor Documentation

◆ LicenseFileStorage()

LicenseSpring.LicenseFileStorage.LicenseFileStorage ( string  licenseFilePath = null)

LicenseFileStorage constructor.

Parameters
licenseFilePathOptional argument, path to the license file

Member Function Documentation

◆ Clear()

virtual void LicenseSpring.LicenseFileStorage.Clear ( )
virtual

Removes local license data.

Implements LicenseSpring.ILicenseStorage.

Reimplemented in LicenseSpring.LicenseFileStorageEx.

◆ LicenseFilePath()

string LicenseSpring.LicenseFileStorage.LicenseFilePath ( )

Returns full path to the license file.

Returns
Absolute path to the license file

◆ LoadFromFile()

string LicenseSpring.LicenseFileStorage.LoadFromFile ( )
protected

Read string data from the file.

Returns
File content as string

◆ LoadLicense()

virtual string LicenseSpring.LicenseFileStorage.LoadLicense ( )
virtual

Load license from file.

Returns
Ecrypted license data

Implements LicenseSpring.ILicenseStorage.

Reimplemented in LicenseSpring.LicenseFileStorageEx.

◆ SaveLicense()

virtual void LicenseSpring.LicenseFileStorage.SaveLicense ( string  licenseData)
virtual

Saves given license data string to the file.

Parameters
licenseDataLicense data string

Implements LicenseSpring.ILicenseStorage.

Reimplemented in LicenseSpring.LicenseFileStorageEx.

◆ SaveToFile()

void LicenseSpring.LicenseFileStorage.SaveToFile ( string  data)
protected

Write string data to the file.

Parameters
dataData to save

Property Documentation

◆ LicenseFileName

string LicenseSpring.LicenseFileStorage.LicenseFileName
getset

License filename with extension (optional)

Default filename is License.key

◆ LicenseFolderPath

string LicenseSpring.LicenseFileStorage.LicenseFolderPath
getset

Folder path where License file is being stored.

Default folder path is Environment.SpecialFolder.LocalApplicationData/LicenseSpring/{ProductCode}


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