| LicenseSpring .Net SDK 8.1.0 Easily add Software Licensing to your application

Loading...
Searching...
No Matches
Public Member Functions | List of all members
LicenseSpring.ILicenseStorage Interface Reference

LicenseStorage interface. More...

Inheritance diagram for LicenseSpring.ILicenseStorage:

## Public Member Functions
void | Clear ()
| Removes local license data.
string | LoadLicense ()
| Load license data.
void | SaveLicense (string licenseData)
| Save license data somewhere.

## Detailed Description

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.

## Member Function Documentation

## ◆ Clear()

void LicenseSpring.ILicenseStorage.Clear | ( |  | ) |

Removes local license data.

Implemented in LicenseSpring.LicenseMemoryStorage, LicenseSpring.LicenseFileStorage, and LicenseSpring.LicenseFileStorageEx.

## ◆ LoadLicense()

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.

Returns
  Encrypted license data string

Implemented in LicenseSpring.LicenseMemoryStorage, LicenseSpring.LicenseFileStorage, and LicenseSpring.LicenseFileStorageEx.

## ◆ SaveLicense()

void LicenseSpring.ILicenseStorage.SaveLicense | ( | string | licenseData | ) |

Save license data somewhere.

Parameters

  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.

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

- ILicenseStorage.cs