LicenseSpring Management .Net SDK 1.10.1
Easily add Software Licensing to your application
Loading...
Searching...
No Matches
LicenseSpring.LicenseService Class Reference

Implements ILicenseService interface. More...

Inheritance diagram for LicenseSpring.LicenseService:
LicenseSpring.BaseService LicenseSpring.ILicenseService LicenseSpring.IService LicenseSpring.IService

Public Member Functions

string AssignUser (ulong licenseId, LicenseUser user)
 Assign User to a License.
Parameters
licenseIdThe Id of the license.
userLicense user to assign.

 
License CheckLicense (License license, string hardwareId)
 Checks the validity of license against a certain hardware ID.
Parameters
licenseThe License to check.
hardwareIdHardware id of the device.

 
uint CountLicenseTransfers (CountTransfersRequestDto dto)
 Counts license transfers if requesting manager has access permissions to it.
Parameters
dtoData transfer object that is used for requesting license transfers.

 
CustomField CreateLicenseCustomField (CreateCustomFieldDto dto)
 Creates a license custom field.
Parameters
dtoData transfer object that is used for creating a custom field.

 
string DeleteLicense (ulong licenseId)
 Delete a single License.
Parameters
licenseIdThe Id of the license that will be deleted.

 
string DeleteLicenseCustomField (uint fieldId)
 Deletes license custom field.
Parameters
fieldIdThe Id of the custom field that will be deleted.

 
string DisableLicense (ulong licenseId)
 Disables the license without devices.
Parameters
licenseIdThe Id of the license that will be disabled.

 
string EnableLicense (ulong licenseId)
 Enables the license.
Parameters
licenseIdThe Id of the license that will be enabled.

 
string[] 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.
 
ActivationHistory[] ListActivationHistories (ListActivationHistoriesRequestDto dto, out uint count)
 Shows all license activation histories the requesting manager has access permissions to.
Parameters
dtoData transfer object that is used for searching through all activation histories.
countQuantity of activation histories, use for iteration of the result pages.

 
CustomField[] ListLicenseCustomFields (ListCustomFieldsRequestDto dto, out uint Count)
 Retrieves license custom fields by license id.
Parameters
dtoData transfer object that is used for searching through all custom fields.
countQuantity of custom fields, use for iteration of the result pages.

 
License[] ListLicenses (ListLicensesRequestDto dto, out uint Count)
 Retrieves license infrmation from LicenseSpring platform.
Parameters
dtoData transfer object that is used for searching through all licenses.
countQuantity of licenses, use for iteration of the result pages.

 
LicenseUser[] ListLicenseUsers (ListUsersRequestDto dto, out uint Count)
 Retrieves infrmation about license users from LicenseSpring platform.
Parameters
dtoData transfer object that is used for searching through all license users.
countQuantity of license users, use for iteration of the result pages.

 
UsageHistory[] ListUsageHistories (ListUsageHistoriesRequestDto dto, out uint count)
 Shows all license usage histories the requesting manager has access permissions to.
Parameters
dtoData transfer object that is used for searching through all usage histories.
countQuantity of usage histories, use for iteration of the result pages.

 
License ResetConsumptions (ulong licenseId)
 Reset license consumptions.
Parameters
licenseIdThe Id of the license that will be reset.

 
string ResetLicense (ulong licenseId)
 Reset a single License.
Parameters
licenseIdThe Id of the license that will be reset.

 
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.
Parameters
keyLicense key of license you want to save.
pathPath on your device where the file will be created.

 
string SetUserPassword (string userEmail, string password)
 Sets password for a single user if requesting manager has access permissions to it.
Parameters
userEmailUser email
passwordThe new password.

 
string SetUserPassword (ulong userId, string password)
 Sets password for a single user if requesting manager has access permissions to it.
Parameters
userIdId of the license user.
passwordThe new password.

 
string UnassignUser (ulong licenseId, ulong userId)
 Unassign User from a License.
Parameters
licenseIdThe Id of the license.
userIdId of the license user to unassign.

 
License UpdateLicense (UpdateLicenseRequestDto dto, ulong licenseId)
 Updates the license.
Parameters
dtoData transfer object that is used for updating licenses.
licenseIdThe Id of the license that will be updated.

 
CustomField UpdateLicenseCustomField (ulong id, string value)
 Updates a license custom field.
Parameters
idId of the custom field.
valueValue of the custom field.

 
License UpdateLicenseProductFeatures (AddLicenseProductFeatureDto[] features, ulong licenseId)
 Updates license product features.
Parameters
featuresFeatures you want to add to the license.
licenseIdThe Id of the license that will be updated.

 
LicenseUser UpdateLicenseUser (LicenseUser user)
 Updates license user.
Parameters
userLicense user to be updated.

 
- Public Member Functions inherited from LicenseSpring.BaseService
void Initialize (ManagementConfiguration configuration)
 Initialize management service with given configuration.
Parameters
configurationManagementConfiguration object to use
Exceptions
System.ArgumentNullExceptionThrown when configuration is null

 
bool IsInitialized ()
 Check whether management service has been initialized.
Returns
True if management service has been initialized and ready to use or false otherwise

 
bool IsOnline (bool throwExceptions=false)
 Helper method, it checks connection to the LicenseSpring platform.
Parameters
throwExceptionsBoolean value indicating whether this method should throw exceptions, by default it's false.
Returns
True if SDK is able to connect to the LicenseSpring platform and false otherwise.
Exceptions
System.InvalidOperationExceptionThrown when license manager is not initialized
LicenseSpring.NetworkExceptionIn case of network errors, e.g. no Internet connection or operation timed out.

 

Detailed Description

Implements ILicenseService interface.

Member Function Documentation

◆ AssignUser()

string LicenseSpring.LicenseService.AssignUser ( ulong  licenseId,
LicenseUser  user 
)

Assign User to a License.

Parameters
licenseIdThe Id of the license.
userLicense user to assign.

Implements LicenseSpring.ILicenseService.

◆ CheckLicense()

License LicenseSpring.LicenseService.CheckLicense ( License  license,
string  hardwareId 
)

Checks the validity of license against a certain hardware ID.

Parameters
licenseThe License to check.
hardwareIdHardware id of the device.

Implements LicenseSpring.ILicenseService.

◆ CountLicenseTransfers()

uint LicenseSpring.LicenseService.CountLicenseTransfers ( CountTransfersRequestDto  dto)

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

Parameters
dtoData transfer object that is used for requesting license transfers.

Implements LicenseSpring.ILicenseService.

◆ CreateLicenseCustomField()

CustomField LicenseSpring.LicenseService.CreateLicenseCustomField ( CreateCustomFieldDto  dto)

Creates a license custom field.

Parameters
dtoData transfer object that is used for creating a custom field.

Implements LicenseSpring.ILicenseService.

◆ DeleteLicense()

string LicenseSpring.LicenseService.DeleteLicense ( ulong  licenseId)

Delete a single License.

Parameters
licenseIdThe Id of the license that will be deleted.

Implements LicenseSpring.ILicenseService.

◆ DeleteLicenseCustomField()

string LicenseSpring.LicenseService.DeleteLicenseCustomField ( uint  fieldId)

Deletes license custom field.

Parameters
fieldIdThe Id of the custom field that will be deleted.

Implements LicenseSpring.ILicenseService.

◆ DisableLicense()

string LicenseSpring.LicenseService.DisableLicense ( ulong  licenseId)

Disables the license without devices.

Parameters
licenseIdThe Id of the license that will be disabled.

Implements LicenseSpring.ILicenseService.

◆ EnableLicense()

string LicenseSpring.LicenseService.EnableLicense ( ulong  licenseId)

Enables the license.

Parameters
licenseIdThe Id of the license that will be enabled.

Implements LicenseSpring.ILicenseService.

◆ GenerateLicenseKey()

string[] LicenseSpring.LicenseService.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.

Implements LicenseSpring.ILicenseService.

◆ ListActivationHistories()

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

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

Parameters
dtoData transfer object that is used for searching through all activation histories.
countQuantity of activation histories, use for iteration of the result pages.

Implements LicenseSpring.ILicenseService.

◆ ListLicenseCustomFields()

CustomField[] LicenseSpring.LicenseService.ListLicenseCustomFields ( ListCustomFieldsRequestDto  dto,
out uint  Count 
)

Retrieves license custom fields by license id.

Parameters
dtoData transfer object that is used for searching through all custom fields.
countQuantity of custom fields, use for iteration of the result pages.

Implements LicenseSpring.ILicenseService.

◆ ListLicenses()

License[] LicenseSpring.LicenseService.ListLicenses ( ListLicensesRequestDto  dto,
out uint  Count 
)

Retrieves license infrmation from LicenseSpring platform.

Parameters
dtoData transfer object that is used for searching through all licenses.
countQuantity of licenses, use for iteration of the result pages.

Implements LicenseSpring.ILicenseService.

◆ ListLicenseUsers()

LicenseUser[] LicenseSpring.LicenseService.ListLicenseUsers ( ListUsersRequestDto  dto,
out uint  Count 
)

Retrieves infrmation about license users from LicenseSpring platform.

Parameters
dtoData transfer object that is used for searching through all license users.
countQuantity of license users, use for iteration of the result pages.

Implements LicenseSpring.ILicenseService.

◆ ListUsageHistories()

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

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

Parameters
dtoData transfer object that is used for searching through all usage histories.
countQuantity of usage histories, use for iteration of the result pages.

Implements LicenseSpring.ILicenseService.

◆ ResetConsumptions()

License LicenseSpring.LicenseService.ResetConsumptions ( ulong  licenseId)

Reset license consumptions.

Parameters
licenseIdThe Id of the license that will be reset.

Implements LicenseSpring.ILicenseService.

◆ ResetLicense()

string LicenseSpring.LicenseService.ResetLicense ( ulong  licenseId)

Reset a single License.

Parameters
licenseIdThe Id of the license that will be reset.

Implements LicenseSpring.ILicenseService.

◆ SaveLicenseByKey()

void LicenseSpring.LicenseService.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
keyLicense key of license you want to save.
pathPath on your device where the file will be created.

Implements LicenseSpring.ILicenseService.

◆ SetUserPassword() [1/2]

string LicenseSpring.LicenseService.SetUserPassword ( string  userEmail,
string  password 
)

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

Parameters
userEmailUser email
passwordThe new password.

Implements LicenseSpring.ILicenseService.

◆ SetUserPassword() [2/2]

string LicenseSpring.LicenseService.SetUserPassword ( ulong  userId,
string  password 
)

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

Parameters
userIdId of the license user.
passwordThe new password.

Implements LicenseSpring.ILicenseService.

◆ UnassignUser()

string LicenseSpring.LicenseService.UnassignUser ( ulong  licenseId,
ulong  userId 
)

Unassign User from a License.

Parameters
licenseIdThe Id of the license.
userIdId of the license user to unassign.

Implements LicenseSpring.ILicenseService.

◆ UpdateLicense()

License LicenseSpring.LicenseService.UpdateLicense ( UpdateLicenseRequestDto  dto,
ulong  licenseId 
)

Updates the license.

Parameters
dtoData transfer object that is used for updating licenses.
licenseIdThe Id of the license that will be updated.

Implements LicenseSpring.ILicenseService.

◆ UpdateLicenseCustomField()

CustomField LicenseSpring.LicenseService.UpdateLicenseCustomField ( ulong  id,
string  value 
)

Updates a license custom field.

Parameters
idId of the custom field.
valueValue of the custom field.

Implements LicenseSpring.ILicenseService.

◆ UpdateLicenseProductFeatures()

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

Updates license product features.

Parameters
featuresFeatures you want to add to the license.
licenseIdThe Id of the license that will be updated.

Implements LicenseSpring.ILicenseService.

◆ UpdateLicenseUser()

LicenseUser LicenseSpring.LicenseService.UpdateLicenseUser ( LicenseUser  user)

Updates license user.

Parameters
userLicense user to be updated.

Implements LicenseSpring.ILicenseService.


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