LicenseSpring .Net SDK 7.22.0
Easily add Software Licensing to your application
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 More...
 
string LicenseFilePath ()
 Returns full path to the license file More...
 
 LicenseFileStorage ()
 LicenseFileStorage constructor
 
 LicenseFileStorage (string licenseFilePath=null)
 LicenseFileStorage constructor More...
 
virtual string LoadLicense ()
 Load license from file More...
 
virtual void SaveLicense (string licenseData)
 Saves given license data string to the file More...
 
void Clear ()
 Removes local license data More...
 
string LoadLicense ()
 Load license data More...
 
void SaveLicense (string licenseData)
 Save license data somewhere More...
 

Protected Member Functions

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

Properties

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

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: