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

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

LicenseService interface. More...

Inheritance diagram for LicenseSpring.ILicenseService:

## Public Member Functions
string | AssignUser (ulong licenseId, LicenseUser user)
| Assign User to a License.
License | CheckLicense (License license, string hardwareId)
| Checks the validity of license against a certain hardware ID.
uint | CountLicenseTransfers (CountTransfersRequestDto dto)
| Counts license transfers if requesting manager has access permissions to it.
CustomField | CreateLicenseCustomField (CreateCustomFieldDto dto)
| Creates a license custom field.
string | DeleteLicense (ulong licenseId)
| Delete a single License.
string | DeleteLicenseCustomField (uint fieldId)
| Deletes license custom field.
string | DisableLicense (ulong licenseId)
| Disables the license without devices.
string | EnableLicense (ulong licenseId)
| Enables the license.
string[] | GenerateLicenseKey (string productCode, uint quantity=1)
| Connect to the LicenseSpring platform and generate requested amount of license keys.
ActivationHistory[] | ListActivationHistories (ListActivationHistoriesRequestDto dto, out uint count)
| Shows all license activation histories the requesting manager has access permissions to.
CustomField[] | ListLicenseCustomFields (ListCustomFieldsRequestDto dto, out uint count)
| Retrieves license custom fields by license id.
License[] | ListLicenses (ListLicensesRequestDto dto, out uint count)
| Retrieves license infrmation from LicenseSpring platform.
LicenseUser[] | ListLicenseUsers (ListUsersRequestDto dto, out uint count)
| Retrieves infrmation about license users from LicenseSpring platform.
UsageHistory[] | ListUsageHistories (ListUsageHistoriesRequestDto dto, out uint count)
| Shows all license usage histories the requesting manager has access permissions to.
License | ResetConsumptions (ulong licenseId)
| Reset license consumptions.
string | ResetLicense (ulong licenseId)
| Reset a single License.
void | SaveLicenseByKey (string key, string path)
| Retrieves license information from LicenseSpring platform and saves it to a file. This file can be used for offline license updating using licensing SDK. See License.UpdateOffline() function in licensing SDK.
string | SetUserPassword (string userEmail, string password)
| Sets password for a single user if requesting manager has access permissions to it.
string | SetUserPassword (ulong userId, string password)
| Sets password for a single user if requesting manager has access permissions to it.
string | UnassignUser (ulong licenseId, ulong userId)
| Unassign User from a License.
License | UpdateLicense (UpdateLicenseRequestDto dto, ulong licenseId)
| Updates the license.
CustomField | UpdateLicenseCustomField (ulong id, string value)
| Updates a license custom field.
License | UpdateLicenseProductFeatures (AddLicenseProductFeatureDto[] features, ulong licenseId)
| Updates license product features.
LicenseUser | UpdateLicenseUser (LicenseUser user)
| Updates license user.
Public Member Functions inherited from LicenseSpring.IService
void | Initialize (ManagementConfiguration configuration)
| Initialize management service with given configuration.
bool | IsInitialized ()
| Check whether management service has been initialized.
bool | IsOnline (bool throwExceptions=false)
| Helper method, it checks connection to the LicenseSpring platform.

## Detailed Description

LicenseService interface.

## Member Function Documentation

## ◆ AssignUser()

string LicenseSpring.ILicenseService.AssignUser | ( | ulong | licenseId,
|  | LicenseUser | user
| ) |  |

Assign User to a License.

Parameters

  licenseId | The Id of the license.
  user | License user to assign.

Implemented in LicenseSpring.LicenseService.

## ◆ CheckLicense()

License LicenseSpring.ILicenseService.CheckLicense | ( | License | license,
|  | string | hardwareId
| ) |  |

Checks the validity of license against a certain hardware ID.

Parameters

  license | The License to check.
  hardwareId | Hardware id of the device.

Implemented in LicenseSpring.LicenseService.

## ◆ CountLicenseTransfers()

uint LicenseSpring.ILicenseService.CountLicenseTransfers | ( | CountTransfersRequestDto | dto | ) |

Counts license transfers if requesting manager has access permissions to it.

Parameters

  dto | Data transfer object that is used for requesting license transfers.

Implemented in LicenseSpring.LicenseService.

## ◆ CreateLicenseCustomField()

CustomField LicenseSpring.ILicenseService.CreateLicenseCustomField | ( | CreateCustomFieldDto | dto | ) |

Creates a license custom field.

Parameters

  dto | Data transfer object that is used for creating a custom field.

Implemented in LicenseSpring.LicenseService.

## ◆ DeleteLicense()

string LicenseSpring.ILicenseService.DeleteLicense | ( | ulong | licenseId | ) |

Delete a single License.

Parameters

  licenseId | The Id of the license that will be deleted.

Implemented in LicenseSpring.LicenseService.

## ◆ DeleteLicenseCustomField()

string LicenseSpring.ILicenseService.DeleteLicenseCustomField | ( | uint | fieldId | ) |

Deletes license custom field.

Parameters

  fieldId | The Id of the custom field that will be deleted.

Implemented in LicenseSpring.LicenseService.

## ◆ DisableLicense()

string LicenseSpring.ILicenseService.DisableLicense | ( | ulong | licenseId | ) |

Disables the license without devices.

Parameters

  licenseId | The Id of the license that will be disabled.

Implemented in LicenseSpring.LicenseService.

## ◆ EnableLicense()

string LicenseSpring.ILicenseService.EnableLicense | ( | ulong | licenseId | ) |

Enables the license.

Parameters

  licenseId | The Id of the license that will be enabled.

Implemented in LicenseSpring.LicenseService.

## ◆ GenerateLicenseKey()

string[] LicenseSpring.ILicenseService.GenerateLicenseKey | ( | string | productCode,
|  | uint | quantity = `1`
| ) |  |

Connect to the LicenseSpring platform and generate requested amount of license keys.

Note, license keys generated here are NOT stored in LicenseSpring system. They get stored once you make an order.

Parameters

  productCode | Product code of licenses you want to create
  quantity | Amount of licenses you want to create

Returns
  Array of created license keys

Exceptions

  System.InvalidOperationException | Thrown when license manager is not initialized
  LicenseSpring.LicenseSpringException | In case license manager misconfigured, e.g. wrong product code
  LicenseSpring.NetworkException | In case of network errors, e.g. no Internet connection or operation timed out.
  LicenseSpring.UnknownLicenseSpringException | In rare case if something went wrong.

Implemented in LicenseSpring.LicenseService.

## ◆ ListActivationHistories()

ActivationHistory[] LicenseSpring.ILicenseService.ListActivationHistories | ( | ListActivationHistoriesRequestDto | dto,
|  | out uint | count
| ) |  |

Shows all license activation histories the requesting manager has access permissions to.

Parameters

  dto | Data transfer object that is used for searching through all activation histories.
  count | Quantity of activation histories, use for iteration of the result pages.

Implemented in LicenseSpring.LicenseService.

## ◆ ListLicenseCustomFields()

CustomField[] LicenseSpring.ILicenseService.ListLicenseCustomFields | ( | ListCustomFieldsRequestDto | dto,
|  | out uint | count
| ) |  |

Retrieves license custom fields by license id.

Parameters

  dto | Data transfer object that is used for searching through all custom fields.
  count | Quantity of custom fields, use for iteration of the result pages.

Implemented in LicenseSpring.LicenseService.

## ◆ ListLicenses()

License[] LicenseSpring.ILicenseService.ListLicenses | ( | ListLicensesRequestDto | dto,
|  | out uint | count
| ) |  |

Retrieves license infrmation from LicenseSpring platform.

Parameters

  dto | Data transfer object that is used for searching through all licenses.
  count | Quantity of licenses, use for iteration of the result pages.

Implemented in LicenseSpring.LicenseService.

## ◆ ListLicenseUsers()

LicenseUser[] LicenseSpring.ILicenseService.ListLicenseUsers | ( | ListUsersRequestDto | dto,
|  | out uint | count
| ) |  |

Retrieves infrmation about license users from LicenseSpring platform.

Parameters

  dto | Data transfer object that is used for searching through all license users.
  count | Quantity of license users, use for iteration of the result pages.

Implemented in LicenseSpring.LicenseService.

## ◆ ListUsageHistories()

UsageHistory[] LicenseSpring.ILicenseService.ListUsageHistories | ( | ListUsageHistoriesRequestDto | dto,
|  | out uint | count
| ) |  |

Shows all license usage histories the requesting manager has access permissions to.

Parameters

  dto | Data transfer object that is used for searching through all usage histories.
  count | Quantity of usage histories, use for iteration of the result pages.

Implemented in LicenseSpring.LicenseService.

## ◆ ResetConsumptions()

License LicenseSpring.ILicenseService.ResetConsumptions | ( | ulong | licenseId | ) |

Reset license consumptions.

Parameters

  licenseId | The Id of the license that will be reset.

Implemented in LicenseSpring.LicenseService.

## ◆ ResetLicense()

string LicenseSpring.ILicenseService.ResetLicense | ( | ulong | licenseId | ) |

Reset a single License.

Parameters

  licenseId | The Id of the license that will be reset.

Implemented in LicenseSpring.LicenseService.

## ◆ SaveLicenseByKey()

void LicenseSpring.ILicenseService.SaveLicenseByKey | ( | string | key,
|  | string | path
| ) |  |

Retrieves license information from LicenseSpring platform and saves it to a file. This file can be used for offline license updating using licensing SDK. See License.UpdateOffline() function in licensing SDK.

Parameters

  key | License key of license you want to save.
  path | Path on your device where the file will be created.

Implemented in LicenseSpring.LicenseService.

## ◆ SetUserPassword() [1/2]

string LicenseSpring.ILicenseService.SetUserPassword | ( | string | userEmail,
|  | string | password
| ) |  |

Sets password for a single user if requesting manager has access permissions to it.

Parameters

  userEmail | User email
  password | The new password.

Implemented in LicenseSpring.LicenseService.

## ◆ SetUserPassword() [2/2]

string LicenseSpring.ILicenseService.SetUserPassword | ( | ulong | userId,
|  | string | password
| ) |  |

Sets password for a single user if requesting manager has access permissions to it.

Parameters

  userId | Id of the license user.
  password | The new password.

Implemented in LicenseSpring.LicenseService.

## ◆ UnassignUser()

string LicenseSpring.ILicenseService.UnassignUser | ( | ulong | licenseId,
|  | ulong | userId
| ) |  |

Unassign User from a License.

Parameters

  licenseId | The Id of the license.
  userId | Id of the license user to unassign.

Implemented in LicenseSpring.LicenseService.

## ◆ UpdateLicense()

License LicenseSpring.ILicenseService.UpdateLicense | ( | UpdateLicenseRequestDto | dto,
|  | ulong | licenseId
| ) |  |

Updates the license.

Parameters

  dto | Data transfer object that is used for updating licenses.
  licenseId | The Id of the license that will be updated.

Implemented in LicenseSpring.LicenseService.

## ◆ UpdateLicenseCustomField()

CustomField LicenseSpring.ILicenseService.UpdateLicenseCustomField | ( | ulong | id,
|  | string | value
| ) |  |

Updates a license custom field.

Parameters

  id | Id of the custom field.
  value | Value of the custom field.

Implemented in LicenseSpring.LicenseService.

## ◆ UpdateLicenseProductFeatures()

License LicenseSpring.ILicenseService.UpdateLicenseProductFeatures | ( | AddLicenseProductFeatureDto[] | features,
|  | ulong | licenseId
| ) |  |

Updates license product features.

Parameters

  features | Features you want to add to the license.
  licenseId | The Id of the license that will be updated.

Implemented in LicenseSpring.LicenseService.

## ◆ UpdateLicenseUser()

LicenseUser LicenseSpring.ILicenseService.UpdateLicenseUser | ( | LicenseUser | user | ) |

Updates license user.

Parameters

  user | License user to be updated.

Implemented in LicenseSpring.LicenseService.

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

- ILicenseService.cs