![]() |
LicenseSpring .Net SDK 8.1.0
Easily add Software Licensing to your application
|
LicenseStorage interface. More...
Public Member Functions | |
| void | Clear () |
| Removes local license data. | |
| string | LoadLicense () |
| Load license data. | |
| void | SaveLicense (string licenseData) |
| Save license data somewhere. | |
LicenseStorage interface.
You can implement this interface to provide your custom license storage logic. For example to store license in your DB, Windows registry, remotely etc.
The encrypted license data is an opaque binary byte container, not printable text: it may contain embedded NUL bytes and arbitrary byte values. A custom storage must preserve it byte-for-byte and length-exact; do not treat it as a NUL-terminated string or apply any text/encoding conversion.
| void LicenseSpring.ILicenseStorage.Clear | ( | ) |
Removes local license data.
Implemented in LicenseSpring.LicenseMemoryStorage, LicenseSpring.LicenseFileStorage, and LicenseSpring.LicenseFileStorageEx.
| string LicenseSpring.ILicenseStorage.LoadLicense | ( | ) |
Load license data.
Return null if license does not exists. The returned value must be byte-for-byte identical to what was passed to SaveLicense. You can throw any appropriate exception in case of errors, it will be wrapped into LocalLicenseException and propagated further.
Implemented in LicenseSpring.LicenseMemoryStorage, LicenseSpring.LicenseFileStorage, and LicenseSpring.LicenseFileStorageEx.
| void LicenseSpring.ILicenseStorage.SaveLicense | ( | string | licenseData | ) |
Save license data somewhere.
| licenseData | Encrypted license data. A byte container that must be stored and returned byte-for-byte (see the interface remarks). |
You can throw any appropriate exception in case of errors, it will be wrapped into LocalLicenseException and propagated further.
Implemented in LicenseSpring.LicenseMemoryStorage, LicenseSpring.LicenseFileStorage, and LicenseSpring.LicenseFileStorageEx.