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

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

BundleManager interface for managing bundle licenses. A bundle allows activating multiple product licenses together as a single unit. More...

Inheritance diagram for LicenseSpring.IBundleManager:

## Public Member Functions
Dictionary< string, ILicense > | ActivateBundle (LicenseID licenseID)
| Activate bundle with given LicenseID.
Dictionary< string, ILicense > | ActivateBundle (LicenseID licenseID, DeviceVariable[] deviceVariables)
| Activate bundle with given LicenseID and device variables.
Dictionary< string, ILicense > | ActivateBundle (string data, string accountCode=null, bool useToken=false, string redirectUri=null)
| Activate bundle using SSO.
IBundleEntry[] | ActivateBundleEntries (LicenseID licenseID)
| COM-friendly equivalent of ActivateBundle(LicenseID).
IBundleEntry[] | ActivateBundleEntries (LicenseID licenseID, DeviceVariable[] deviceVariables)
| COM-friendly equivalent of ActivateBundle(LicenseID, DeviceVariable[]).
IBundleEntry[] | ActivateBundleEntries (string data, string accountCode=null, bool useToken=false, string redirectUri=null)
| COM-friendly equivalent of ActivateBundle(string, string, bool, string).
Dictionary< string, ILicense > | ActivateBundleOffline (string activationResponseFile=null)
| Activate bundle using offline activation response file.
IBundleEntry[] | ActivateBundleOfflineEntries (string activationResponseFile=null)
| COM-friendly equivalent of ActivateBundleOffline.
void | CheckBundle (LicenseID licenseID, IInstallationFileOptions filter=null, bool includeExpiredFeatures=false)
| Check bundle license with LicenseSpring backend and update local data.
void | ClearLocalStorage ()
| See BaseManager.ClearLocalStorage.
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.
IBundleEntry[] | GetCurrentBundleEntries ()
| COM-friendly equivalent of GetCurrentBundle.
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.
void | Initialize (Configuration configuration, ILicenseStorage storage=null)
| See BaseManager.Initialize.
bool | IsInitialized ()
| See BaseManager.IsInitialized.
string | LicenseFilePath ()
| See BaseManager.LicenseFilePath.

## Properties
string | DataLocation`[get, set]`
| See BaseManager.DataLocation.
string | LicenseFileName`[get, set]`
| See BaseManager.LicenseFileName.

## Detailed Description

BundleManager interface for managing bundle licenses. A bundle allows activating multiple product licenses together as a single unit.

## Member Function Documentation

## ◆ ActivateBundle() [1/3]

Dictionary< string, ILicense > LicenseSpring.IBundleManager.ActivateBundle | ( | LicenseID | licenseID | ) |

Activate bundle with given LicenseID.

Parameters

  licenseID | Bundle license ID: license key or email and password.

Returns
  Dictionary of activated licenses mapped by product code.

Exceptions

  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.

This member is not COM compatible (generic `Dictionary`). COM clients should use ActivateBundleEntries(LicenseID).

Implemented in LicenseSpring.BundleManager.

## ◆ ActivateBundle() [2/3]

Dictionary< string, ILicense > LicenseSpring.IBundleManager.ActivateBundle | ( | LicenseID | licenseID,
|  | DeviceVariable[] | deviceVariables
| ) |  |

Activate bundle with given LicenseID and device variables.

Parameters

  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.

Returns
  Dictionary of activated licenses mapped by product code.

Exceptions

  System.InvalidOperationException | Thrown when bundle manager is not initialized.
  LicenseSpring.LicenseActivationException | In case something went wrong with bundle activation.

This member is not COM compatible (generic `Dictionary`). COM clients should use ActivateBundleEntries(LicenseID, DeviceVariable[]).

Implemented in LicenseSpring.BundleManager.

## ◆ ActivateBundle() [3/3]

Dictionary< string, ILicense > LicenseSpring.IBundleManager.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.

Parameters

  data | id_token or code you get after user authorization with SSO.
  accountCode | Customer account code.
  useToken | Whether to use id_token instead of code for activation.
  redirectUri | An optional redirect URI that needs to be sent with authentication data. The License API expects a non-empty value only when using an alternate SSO URL.

Returns
  Dictionary of activated licenses mapped by product code.

Exceptions

  System.InvalidOperationException | Thrown when bundle manager is not initialized or token is empty.
  LicenseSpring.LicenseActivationException | In case something went wrong with bundle activation.

This member is not COM compatible (generic `Dictionary`). COM clients should use ActivateBundleEntries(string, string, bool, string).

Implemented in LicenseSpring.BundleManager.

## ◆ ActivateBundleEntries() [1/3]

IBundleEntry[] LicenseSpring.IBundleManager.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.

Parameters

  licenseID | Bundle license ID: license key or email and password.

Returns
  Array of activated bundle entries (product code + license).

Implemented in LicenseSpring.BundleManager.

## ◆ ActivateBundleEntries() [2/3]

IBundleEntry[] LicenseSpring.IBundleManager.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.

Parameters

  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.

Returns
  Array of activated bundle entries (product code + license).

Implemented in LicenseSpring.BundleManager.

## ◆ ActivateBundleEntries() [3/3]

IBundleEntry[] LicenseSpring.IBundleManager.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.

Parameters

  data | id_token or code you get after user authorization with SSO.
  accountCode | Customer account code.
  useToken | Whether to use id_token instead of code for activation.
  redirectUri | An optional redirect URI that needs to be sent with authentication data.

Returns
  Array of activated bundle entries (product code + license).

Implemented in LicenseSpring.BundleManager.

## ◆ ActivateBundleOffline()

Dictionary< string, ILicense > LicenseSpring.IBundleManager.ActivateBundleOffline | ( | string | activationResponseFile = `null` | ) |

Activate bundle using offline activation response file.

Parameters

  activationResponseFile | Path to the activation response file (.lic file). If null, looks for file on desktop.

Returns
  Dictionary of activated licenses mapped by product code.

Exceptions

  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.

This member is not COM compatible (generic `Dictionary`). COM clients should use ActivateBundleOfflineEntries.

Implemented in LicenseSpring.BundleManager.

## ◆ ActivateBundleOfflineEntries()

IBundleEntry[] LicenseSpring.IBundleManager.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.

Parameters

  activationResponseFile | Path to the activation response file (.lic file). If null, looks for file on desktop.

Returns
  Array of activated bundle entries (product code + license).

Implemented in LicenseSpring.BundleManager.

## ◆ CheckBundle()

void LicenseSpring.IBundleManager.CheckBundle | ( | LicenseID | licenseID,
|  | IInstallationFileOptions | filter = `null`,
|  | bool | includeExpiredFeatures = `false`
| ) |  |

Check bundle license with LicenseSpring backend and update local data.

Parameters

  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.

Exceptions

  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.

Implemented in LicenseSpring.BundleManager.

## ◆ ClearLocalStorage()

void LicenseSpring.IBundleManager.ClearLocalStorage | ( |  | ) |

See BaseManager.ClearLocalStorage.

Implemented in LicenseSpring.BundleManager.

## ◆ DeactivateBundle()

bool LicenseSpring.IBundleManager.DeactivateBundle | ( | LicenseID | licenseID,
|  | bool | removeLocalData = `false`
| ) |  |

Deactivate bundle license.

Parameters

  licenseID | Bundle license ID: license key or email and password.
  removeLocalData | If true, removes local storage. If false, marks licenses as inactive locally.

Returns
  True if deactivation successful.

Exceptions

  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.

Implemented in LicenseSpring.BundleManager.

## ◆ DeactivateBundleOffline()

string LicenseSpring.IBundleManager.DeactivateBundleOffline | ( | LicenseID | licenseID,
|  | string | deactivationRequestFile = `null`
| ) |  |

Create offline deactivation request file for bundle.

Parameters

  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.

Returns
  Full path to the created request file.

Exceptions

  System.InvalidOperationException | Thrown when bundle manager is not initialized.

Implemented in LicenseSpring.BundleManager.

## ◆ GetCurrentBundle()

Dictionary< string, ILicense > LicenseSpring.IBundleManager.GetCurrentBundle | ( |  | ) |

Get the current bundle from local storage.

Loads bundle licenses lazily from storage on first access.

This member is not COM compatible (generic `Dictionary`). COM clients should use GetCurrentBundleEntries.

Returns
  Dictionary mapping product codes to their respective licenses. Returns empty dictionary if no bundle is activated.

Implemented in LicenseSpring.BundleManager.

## ◆ GetCurrentBundleEntries()

IBundleEntry[] LicenseSpring.IBundleManager.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.

Returns
  Array of bundle entries (product code + license). Empty array if no bundle is activated.

Implemented in LicenseSpring.BundleManager.

## ◆ GetOfflineActivationFile() [1/2]

string LicenseSpring.IBundleManager.GetOfflineActivationFile | ( | LicenseID | licenseID,
|  | DeviceVariable[] | deviceVariables,
|  | string | activationRequestFile = `null`
| ) |  |

Creates offline activation file request.

Parameters

  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).

Returns
  Path to offline activation file request.

Exceptions

  System.InvalidOperationException | Thrown when license manager is not initialized.

Implemented in LicenseSpring.BundleManager.

## ◆ GetOfflineActivationFile() [2/2]

string LicenseSpring.IBundleManager.GetOfflineActivationFile | ( | LicenseID | licenseID,
|  | string | activationRequestFile = `null`
| ) |  |

Creates offline activation file request.

Parameters

  licenseID | License ID, license key or email and password.
  activationRequestFile | Activation request file path, null means use default path (Desktop).

Returns
  Path to offline activation file request.

Exceptions

  System.InvalidOperationException | Thrown when license manager is not initialized.

Implemented in LicenseSpring.BundleManager.

## ◆ GetProductDetails() [1/2]

ProductDetails LicenseSpring.IBundleManager.GetProductDetails | ( | bool | includeCustomFields,
|  | bool | includeLatestVersion,
|  | string | env
| ) |  |

Retrieve information about a product from LicenseSpring backend.

Parameters

  includeCustomFields | If true, includes custom fields data.
  includeLatestVersion | If true, includes latest version information.
  env | Optional parameter, filters products by environment string.

Returns
  Product details.

Implemented in LicenseSpring.BundleManager.

## ◆ GetProductDetails() [2/2]

ProductDetails LicenseSpring.IBundleManager.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.

Parameters

  includeCustomFields | Optional parameter, if true return object contains custom fields data.
  includeLatestVersion | Optional parameter, if true return object contains additional information about the latest version. Default false.

Returns
  Product details.

Exceptions

  System.InvalidOperationException | Thrown when bundle manager is not initialized.
  LicenseSpring.ProductNotFoundException | In case product does not exist on the server.
  LicenseSpring.NetworkException | In case of network errors.

Implemented in LicenseSpring.BundleManager.

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

- IBundleManager.cs