![]() |
LicenseSpring .Net SDK 8.1.0
Easily add Software Licensing to your application
|
Class for managing bundle licenses. A bundle allows activating multiple product licenses together as a single unit. Implements IBundleManager interface.
More...
Public Member Functions | |||||||||||||||||||||
| Dictionary< string, ILicense > | ActivateBundle (LicenseID licenseID) | ||||||||||||||||||||
Activate bundle with given LicenseID.
Dictionary). COM clients should use ActivateBundleEntries(LicenseID). | |||||||||||||||||||||
| Dictionary< string, ILicense > | ActivateBundle (LicenseID licenseID, DeviceVariable[] deviceVariables) | ||||||||||||||||||||
Activate bundle with given LicenseID and device variables.
Dictionary). COM clients should use ActivateBundleEntries(LicenseID, DeviceVariable[]). | |||||||||||||||||||||
| Dictionary< string, ILicense > | ActivateBundle (string data, string accountCode=null, bool useToken=false, string redirectUri=null) | ||||||||||||||||||||
| Activate bundle using SSO.You can omit accountCode param if you already set customer account code through the Configuration. | |||||||||||||||||||||
| IBundleEntry[] | ActivateBundleEntries (LicenseID licenseID) | ||||||||||||||||||||
| COM-friendly equivalent of ActivateBundle(LicenseID).Each IBundleEntry corresponds to one entry of the ActivateBundle(LicenseID) dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value. | |||||||||||||||||||||
| IBundleEntry[] | ActivateBundleEntries (LicenseID licenseID, DeviceVariable[] deviceVariables) | ||||||||||||||||||||
| COM-friendly equivalent of ActivateBundle(LicenseID, DeviceVariable[]).Each IBundleEntry corresponds to one entry of the bundle dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value. | |||||||||||||||||||||
| IBundleEntry[] | ActivateBundleEntries (string data, string accountCode=null, bool useToken=false, string redirectUri=null) | ||||||||||||||||||||
| COM-friendly equivalent of ActivateBundle(string, string, bool, string).Each IBundleEntry corresponds to one entry of the bundle dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value. | |||||||||||||||||||||
| Dictionary< string, ILicense > | ActivateBundleOffline (string activationResponseFile=null) | ||||||||||||||||||||
Activate bundle using offline activation response file.
Dictionary). COM clients should use ActivateBundleOfflineEntries. | |||||||||||||||||||||
| IBundleEntry[] | ActivateBundleOfflineEntries (string activationResponseFile=null) | ||||||||||||||||||||
| COM-friendly equivalent of ActivateBundleOffline.Each IBundleEntry corresponds to one entry of the bundle dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value. | |||||||||||||||||||||
| BundleManager () | |||||||||||||||||||||
| Constructor of BundleManager. | |||||||||||||||||||||
| void | CheckBundle (LicenseID licenseID, IInstallationFileOptions filter=null, bool includeExpiredFeatures=false) | ||||||||||||||||||||
Check bundle license with LicenseSpring backend and update local data.
| |||||||||||||||||||||
| new void | ClearLocalStorage () | ||||||||||||||||||||
| Override ClearLocalStorage to also clear cached licenses. | |||||||||||||||||||||
| bool | DeactivateBundle (LicenseID licenseID, bool removeLocalData=false) | ||||||||||||||||||||
Deactivate bundle license.
| |||||||||||||||||||||
| string | DeactivateBundleOffline (LicenseID licenseID, string deactivationRequestFile=null) | ||||||||||||||||||||
Create offline deactivation request file for bundle.
| |||||||||||||||||||||
| Dictionary< string, ILicense > | GetCurrentBundle () | ||||||||||||||||||||
| Get the current bundle from local storage.Loads bundle licenses lazily from storage on first access. | |||||||||||||||||||||
| IBundleEntry[] | GetCurrentBundleEntries () | ||||||||||||||||||||
| COM-friendly equivalent of GetCurrentBundle.Each IBundleEntry corresponds to one entry of the GetCurrentBundle dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value. | |||||||||||||||||||||
| string | GetOfflineActivationFile (LicenseID licenseID, DeviceVariable[] deviceVariables, string activationRequestFile=null) | ||||||||||||||||||||
Creates offline activation file request.
| |||||||||||||||||||||
| string | GetOfflineActivationFile (LicenseID licenseID, string activationRequestFile=null) | ||||||||||||||||||||
Creates offline activation file request.
| |||||||||||||||||||||
| ProductDetails | GetProductDetails (bool includeCustomFields, bool includeLatestVersion, string env) | ||||||||||||||||||||
Retrieve information about a product from LicenseSpring backend.
| |||||||||||||||||||||
| ProductDetails | GetProductDetails (bool includeCustomFields=false, bool includeLatestVersion=false) | ||||||||||||||||||||
| Retrieve information about a product from LicenseSpring backend.In offline mode data will be retrieved from license file if present. | |||||||||||||||||||||
Public Member Functions inherited from LicenseSpring.BaseManager | |||||||||||||||||||||
| 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). | |||||||||||||||||||||
| virtual 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. | |||||||||||||||||||||
Public Member Functions inherited from LicenseSpring.IBundleManager | |||||||||||||||||||||
| void | Initialize (Configuration configuration, ILicenseStorage storage=null) | ||||||||||||||||||||
| See BaseManager.Initialize. | |||||||||||||||||||||
| bool | IsInitialized () | ||||||||||||||||||||
| See BaseManager.IsInitialized. | |||||||||||||||||||||
| string | LicenseFilePath () | ||||||||||||||||||||
| See BaseManager.LicenseFilePath. | |||||||||||||||||||||
Static Public Member Functions | |
| static IBundleManager | GetInstance () |
| Get singleton BundleManager instance. | |
Additional Inherited Members | |
Properties inherited from LicenseSpring.BaseManager | |
| 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. | |
Properties inherited from LicenseSpring.IBundleManager | |
| string | DataLocation [get, set] |
| See BaseManager.DataLocation. | |
| string | LicenseFileName [get, set] |
| See BaseManager.LicenseFileName. | |
Class for managing bundle licenses. A bundle allows activating multiple product licenses together as a single unit. Implements IBundleManager interface.
| LicenseSpring.BundleManager.BundleManager | ( | ) |
Constructor of BundleManager.
You can use singleton instance by BundleManager.GetInstance or create manager directly with this constructor.
Activate bundle with given LicenseID.
| licenseID | Bundle license ID: license key or email and password. |
| System.InvalidOperationException | Thrown when bundle manager is not initialized. |
| LicenseSpring.ProductNotFoundException | In case product does not exist on the platform. |
| LicenseSpring.LicenseNotFoundException | In case provided bundle license was not found. |
| LicenseSpring.LicenseActivationException | In case something went wrong with bundle activation. |
| LicenseSpring.LicenseDisabledException | Thrown when bundle license is disabled. |
| LicenseSpring.LicenseExpiredException | Thrown when bundle license is expired. |
| LicenseSpring.SignatureMismatchException | In case signature returned by LicenseSpring backend is not valid or missing. |
| LicenseSpring.LicenseServerException | In case of internal LicenseSpring backend error. |
| LicenseSpring.NetworkException | In case of network errors, e.g. no Internet connection or operation timed out. |
Dictionary). COM clients should use ActivateBundleEntries(LicenseID).
Implements LicenseSpring.IBundleManager.
| Dictionary< string, ILicense > LicenseSpring.BundleManager.ActivateBundle | ( | LicenseID | licenseID, |
| DeviceVariable[] | deviceVariables | ||
| ) |
Activate bundle with given LicenseID and device variables.
| licenseID | Bundle license ID: license key or email and password. |
| deviceVariables | An array of device variables to be sent to the LicenseSpring platform during bundle activation. |
| System.InvalidOperationException | Thrown when bundle manager is not initialized. |
| LicenseSpring.LicenseActivationException | In case something went wrong with bundle activation. |
Dictionary). COM clients should use ActivateBundleEntries(LicenseID, DeviceVariable[]).
Implements LicenseSpring.IBundleManager.
| Dictionary< string, ILicense > LicenseSpring.BundleManager.ActivateBundle | ( | string | data, |
| string | accountCode = null, |
||
| bool | useToken = false, |
||
| string | redirectUri = null |
||
| ) |
Activate bundle using SSO.You can omit accountCode param if you already set customer account code through the Configuration.
Implements LicenseSpring.IBundleManager.
| IBundleEntry[] LicenseSpring.BundleManager.ActivateBundleEntries | ( | LicenseID | licenseID | ) |
COM-friendly equivalent of ActivateBundle(LicenseID).Each IBundleEntry corresponds to one entry of the ActivateBundle(LicenseID) dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value.
Implements LicenseSpring.IBundleManager.
| IBundleEntry[] LicenseSpring.BundleManager.ActivateBundleEntries | ( | LicenseID | licenseID, |
| DeviceVariable[] | deviceVariables | ||
| ) |
COM-friendly equivalent of ActivateBundle(LicenseID, DeviceVariable[]).Each IBundleEntry corresponds to one entry of the bundle dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value.
Implements LicenseSpring.IBundleManager.
| IBundleEntry[] LicenseSpring.BundleManager.ActivateBundleEntries | ( | string | data, |
| string | accountCode = null, |
||
| bool | useToken = false, |
||
| string | redirectUri = null |
||
| ) |
COM-friendly equivalent of ActivateBundle(string, string, bool, string).Each IBundleEntry corresponds to one entry of the bundle dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value.
Implements LicenseSpring.IBundleManager.
| Dictionary< string, ILicense > LicenseSpring.BundleManager.ActivateBundleOffline | ( | string | activationResponseFile = null | ) |
Activate bundle using offline activation response file.
| activationResponseFile | Path to the activation response file (.lic file). If null, looks for file on desktop. |
| System.InvalidOperationException | Thrown when bundle manager is not initialized. |
| System.IO.FileNotFoundException | If activation response file not found. |
| LicenseSpring.SignatureMismatchException | In case signature in response file is not valid. |
Dictionary). COM clients should use ActivateBundleOfflineEntries.
Implements LicenseSpring.IBundleManager.
| IBundleEntry[] LicenseSpring.BundleManager.ActivateBundleOfflineEntries | ( | string | activationResponseFile = null | ) |
COM-friendly equivalent of ActivateBundleOffline.Each IBundleEntry corresponds to one entry of the bundle dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value.
Implements LicenseSpring.IBundleManager.
| void LicenseSpring.BundleManager.CheckBundle | ( | LicenseID | licenseID, |
| IInstallationFileOptions | filter = null, |
||
| bool | includeExpiredFeatures = false |
||
| ) |
Check bundle license with LicenseSpring backend and update local data.
| licenseID | Bundle license ID: license key or email and password. |
| filter | Optional filter for installation files. |
| includeExpiredFeatures | If true, includes expired features in the response. |
| System.InvalidOperationException | Thrown when bundle manager is not initialized. |
| LicenseSpring.LicenseNotFoundException | In case provided bundle license was not found. |
| LicenseSpring.LicenseServerException | In case of internal LicenseSpring backend error. |
| LicenseSpring.NetworkException | In case of network errors. |
Implements LicenseSpring.IBundleManager.
| new void LicenseSpring.BundleManager.ClearLocalStorage | ( | ) |
Override ClearLocalStorage to also clear cached licenses.
Implements LicenseSpring.IBundleManager.
| bool LicenseSpring.BundleManager.DeactivateBundle | ( | LicenseID | licenseID, |
| bool | removeLocalData = false |
||
| ) |
Deactivate bundle license.
| licenseID | Bundle license ID: license key or email and password. |
| removeLocalData | If true, removes local storage. If false, marks licenses as inactive locally. |
| System.InvalidOperationException | Thrown when bundle manager is not initialized. |
| LicenseSpring.LicenseNotFoundException | In case provided bundle license was not found. |
| LicenseSpring.LicenseServerException | In case of internal LicenseSpring backend error. |
| LicenseSpring.NetworkException | In case of network errors. |
Implements LicenseSpring.IBundleManager.
| string LicenseSpring.BundleManager.DeactivateBundleOffline | ( | LicenseID | licenseID, |
| string | deactivationRequestFile = null |
||
| ) |
Create offline deactivation request file for bundle.
| licenseID | Bundle license ID: license key or email and password. |
| deactivationRequestFile | Path where to save the request file. If null, saves to desktop as ls_deactivation.req. |
| System.InvalidOperationException | Thrown when bundle manager is not initialized. |
Implements LicenseSpring.IBundleManager.
| Dictionary< string, ILicense > LicenseSpring.BundleManager.GetCurrentBundle | ( | ) |
Get the current bundle from local storage.Loads bundle licenses lazily from storage on first access.
Implements LicenseSpring.IBundleManager.
| IBundleEntry[] LicenseSpring.BundleManager.GetCurrentBundleEntries | ( | ) |
COM-friendly equivalent of GetCurrentBundle.Each IBundleEntry corresponds to one entry of the GetCurrentBundle dictionary: IBundleEntry.ProductCode is the dictionary key and IBundleEntry.License is the dictionary value.
Implements LicenseSpring.IBundleManager.
|
static |
Get singleton BundleManager instance.
| string LicenseSpring.BundleManager.GetOfflineActivationFile | ( | LicenseID | licenseID, |
| DeviceVariable[] | deviceVariables, | ||
| string | activationRequestFile = null |
||
| ) |
Creates offline activation file request.
| licenseID | License ID, license key or email and password. |
| deviceVariables | An array of device variables to be sent to the LicenseSpring platform during license activation. |
| activationRequestFile | Activation request file path, null means use default path (Desktop). |
| System.InvalidOperationException | Thrown when license manager is not initialized. |
Implements LicenseSpring.IBundleManager.
| string LicenseSpring.BundleManager.GetOfflineActivationFile | ( | LicenseID | licenseID, |
| string | activationRequestFile = null |
||
| ) |
Creates offline activation file request.
| licenseID | License ID, license key or email and password. |
| activationRequestFile | Activation request file path, null means use default path (Desktop). |
| System.InvalidOperationException | Thrown when license manager is not initialized. |
Implements LicenseSpring.IBundleManager.
| ProductDetails LicenseSpring.BundleManager.GetProductDetails | ( | bool | includeCustomFields, |
| bool | includeLatestVersion, | ||
| string | env | ||
| ) |
Retrieve information about a product from LicenseSpring backend.
| includeCustomFields | If true, includes custom fields data. |
| includeLatestVersion | If true, includes latest version information. |
| env | Optional parameter, filters products by environment string. |
Implements LicenseSpring.IBundleManager.
| ProductDetails LicenseSpring.BundleManager.GetProductDetails | ( | bool | includeCustomFields = false, |
| bool | includeLatestVersion = false |
||
| ) |
Retrieve information about a product from LicenseSpring backend.In offline mode data will be retrieved from license file if present.
Implements LicenseSpring.IBundleManager.