![]() |
LicenseSpring .Net SDK 7.22.0
Easily add Software Licensing to your application
|
Public Member Functions | |
void | AddDeviceVariable (DeviceVariable variable) |
Add new or update existing device variable to license data More... | |
void | AddDeviceVariable (string name, string value) |
Add new or update existing device variable to license data More... | |
void | AddDeviceVariables (DeviceVariable[] variables) |
Add new or update existing device variables to license data More... | |
void | Borrow (DateTime endDateTime) |
Borrow floating license till provided end date time More... | |
void | Borrow (string borrowEndDateTime=null) |
Borrow floating license till provided end date time string More... | |
void | Borrow (uint hours, uint days) |
Borrow floating license for provided time interval More... | |
bool | CanBorrow () |
Is this license can be borrowed or not More... | |
bool | ChangePassword (string password, string newPassword) |
Change password for user-based license More... | |
InstallationFile | Check (IInstallationFileOptions options=null) |
Check current license for validity on the LicenseSpring platform More... | |
ConsumptionPeriod | ConsumptionPeriod () |
Period of time after which consumption is reset. More... | |
CustomField[] | CustomFields () |
Custom data fields available for the license More... | |
int | DaysPassedSinceLastCheck () |
How many days passed since last online check More... | |
int | DaysRemaining () |
How many days remaining till license expires in current time zone More... | |
int | DaysRemainingUTC () |
How many days remaining till license expires More... | |
bool | Deactivate (bool removeLocalData=false) |
Deactivate current license More... | |
void | DeactivateAirGap (string confirmationCode) |
Verify Confirmation code and deactivate air gap license More... | |
string | DeactivateOffline (string deactivationRequestFile=null) |
Deactivate license locally and create offline deactivation file request More... | |
DeviceVariable | DeviceVariable (string name) |
Get device variable by name More... | |
string | DeviceVariableValue (string name) |
Get device variable value by name More... | |
LicenseFeature | Feature (string featureCode) |
Get product (license) feature by feature code More... | |
LicenseFeature[] | Features () |
Product features available for the license More... | |
string | FloatingClientId () |
Floating user (client) or instance id More... | |
DateTime | FloatingEndDateTime () |
Floating license validity end date time in local time zone More... | |
DateTime | FloatingEndDateTimeUtc () |
Floating license validity end date time in UTC More... | |
uint | FloatingSlotsCount () |
Overall Floating slots or users count. Amount of simultaneous users (instances) allowed for this license. More... | |
uint | FloatingSlotsInUse () |
Current floatings slots in use count, including this user (instance). More... | |
uint | FloatingTimeout () |
Floating timeout in minutes More... | |
string | GetAirGapDeactivationCode (string initializationCode) |
Get air gap Deactivation code. More... | |
DeviceVariable[] | GetDeviceVariables (bool getFromBackend=false) |
Get device variables from the local license or from the backend More... | |
ProductDetails | GetProductDetails () |
Get information about a product this license belongs to More... | |
DateTime | GracePeriodEndDateTime () |
Getter for grace period end date time in local time More... | |
DateTime | GracePeriodEndDateTimeUTC () |
Getter for grace period end date time in UTC More... | |
double | GracePeriodHoursRemaining () |
How many hours remaining till grace period ends More... | |
LicenseID | Id () |
License ID More... | |
bool | IsAirGapped () |
Is this license was activated using air-gap activation More... | |
bool | IsBorrowed () |
Checker for whether the license is borrowed More... | |
bool | IsConsumptionOverageAllowed () |
Is it allowed to exceed consumption for this license. More... | |
bool | IsConsumptionResetEnabled () |
Indicates whether consumption resets after a certain period of time. More... | |
bool | IsDeviceTransferAllowed () |
Checks if license can be transfered between devices More... | |
bool | IsDeviceTransferLimited () |
Checks if the license allows only limited number of transfers between devices More... | |
bool | IsExpired () |
Is license expired More... | |
bool | IsFloating () |
Is this license floating More... | |
bool | IsGracePeriodStarted () |
Check if grace period started for a license More... | |
bool | IsMaintenancePeriodExpired () |
Is maintenance period expired More... | |
bool | IsOfflineActivated () |
Is this license was activated offline More... | |
bool | IsSubscriptionGracePeriodStarted () |
Check if grace period started for subscription license More... | |
bool | IsTrial () |
Is this license trial More... | |
bool | IsUnlimitedConsumptionAllowed () |
Is unlimited consumption allowed for the license More... | |
bool | IsValid () |
Fast and simple way to check current local state of the license. More... | |
string | Key () |
License key More... | |
DateTime | LastCheckDate () |
The DateTime of the last sync with the LicenseSpring platform More... | |
DateTime | LastCheckDateUTC () |
The DateTime of the last sync with the LicenseSpring platform More... | |
LicenseUser | LicenseUser () |
License user More... | |
void | LocalCheck () |
Perform check for license validity locally More... | |
int | MaintenanceDaysRemaining () |
How many days remaining till maintenance period expires in current time zone More... | |
DateTime | MaintenancePeriod () |
Maintenance period for the license More... | |
DateTime | MaintenancePeriodUTC () |
Maintenance period for the license More... | |
uint | MaxActivations () |
How many times license can be activated More... | |
uint | MaxBorrowTime () |
Maximum borrowing period in hours More... | |
int | MaxConsumption () |
Maximum consumption of the license More... | |
int | MaxConsumptionOverage () |
Extra amount of consumption that allows to go over MaxConsumption . More... | |
string | Metadata () |
License metadata More... | |
Customer | Owner () |
Gets the information about license owner, commonly it's a person or organization associated with the license More... | |
uint | PolicyId () |
License Policy id More... | |
void | Register () |
Register floating license and occupy floating slot. More... | |
void | Release (bool throwExceptions=false) |
Stop license watchdog thread and revoke floating license so other user can use it. More... | |
void | ResumeLicenseWatchdog () |
Restart background thread, you can call this within you callback in order to resume periodic license checks. More... | |
bool | SendDeviceVariables () |
Send current device variables list to the backend (see device variables on the platform) More... | |
void | SetupLicenseWatchdog (LicenseWatchdogCallback callback, uint timeout=0) |
Setup and run license watchdog, a background thread which periodically checks the license, by so keeping it alive. More... | |
void | SetupLicenseWatchdog (LicenseWatchdogSettings settings) |
Setup and run license watchdog, a background thread which periodically checks the license, by so keeping it alive. More... | |
void | SetWatchdogTimeout (uint timeout=0) |
Set new timout for license watchdog. More... | |
DateTime | StartDate () |
License start date More... | |
LicenseStatus | Status () |
Method for getting local license status, see LicenseStatus documentation More... | |
void | StopLicenseWatchdog () |
Stops license watchdog background thread. More... | |
uint | SubscriptionGracePeriod () |
Grace period in hours More... | |
bool | SyncConsumption (OverageRequest overageRequest=null) |
Sync Consumption license with the LicenseSpring platform More... | |
bool | SyncFeatureConsumption (string featureCode=null) |
Sync Consumption feature with the LicenseSpring platform More... | |
uint | TimesActivated () |
How many times license already been activated More... | |
int | TotalConsumption () |
Current total consumption of the license More... | |
uint | TransferCount () |
How many times license has been transferred between devices More... | |
uint | TransferLimit () |
Maximum number of allowed license transfers between devices More... | |
LicenseType | Type () |
Type of license More... | |
void | UpdateConsumption (int value=1) |
Increase local consumption counter for consumption license More... | |
void | UpdateFeatureConsumption (string featureCode, int value=1) |
Increase local consumption counter for consumption product feature. More... | |
bool | UpdateOffline (string path) |
Update license data accordingly to provided file. More... | |
string | User () |
Email of the License user More... | |
DateTime | ValidityPeriod () |
The DateTime until the license is valid More... | |
DateTime | ValidityPeriodUTC () |
The DateTime until the license is valid More... | |
DateTime | ValidityWithGracePeriod () |
The DateTime until the license is valid including grace period More... | |
DateTime | ValidityWithGracePeriodUTC () |
The DateTime until the license is valid including grace period More... | |
License interface
Provides all information on a license and license check methods.
void LicenseSpring.ILicense.AddDeviceVariable | ( | DeviceVariable | variable | ) |
Add new or update existing device variable to license data
Variable will be stored in local license, in order to send device variables to the backend see License.SendDeviceVariables
variable | Device variable |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.AddDeviceVariable | ( | string | name, |
string | value | ||
) |
Add new or update existing device variable to license data
Variable will be stored in local license, in order to send device variables to the backend see License.SendDeviceVariables
name | Device variable name |
value | Device variable value |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.AddDeviceVariables | ( | DeviceVariable[] | variables | ) |
Add new or update existing device variables to license data
Variables will be stored in local license, in order to send device variables to the backend see License.SendDeviceVariables
variables | Device variables |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.Borrow | ( | DateTime | endDateTime | ) |
Borrow floating license till provided end date time
Meaningful only for floating licenses.
endDateTime | Borrowing end date time in local time. |
System.ArgumentException | In case end date time is invalid or in the past. |
LicenseSpring.NetworkException | In case of network errors, e.g. no Internet connection or operation timed out. |
LicenseSpring.BorrowLicenseException | If borrowing is not allowed or provided borrowing period is bigger than max. |
LicenseSpring.SignatureMismatchException | In case signature returned by LicenseSpring backend is not valid or missing |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.Borrow | ( | string | borrowEndDateTime = null | ) |
Borrow floating license till provided end date time string
Meaningful only for floating licenses.
borrowEndDateTime | Borrow end date time in UTC in format "%Y-%m-%dT%H:%M:%SZ". If it's null or empty the license will be borrowed for max possible period. |
LicenseSpring.NetworkException | In case of network errors, e.g. no Internet connection or operation timed out. |
LicenseSpring.BorrowLicenseException | If borrowing is not allowed or provided borrowing period is bigger than max. |
LicenseSpring.SignatureMismatchException | In case signature returned by LicenseSpring backend is not valid or missing |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.Borrow | ( | uint | hours, |
uint | days | ||
) |
Borrow floating license for provided time interval
Meaningful only for floating licenses.
During borrow period there is no need to register floating license to keep it alive.
hours | Count of hours from now you want borrow license for. |
days | Count of days from now you want borrow license for. |
LicenseSpring.NetworkException | In case of network errors, e.g. no Internet connection or operation timed out. |
LicenseSpring.BorrowLicenseException | If borrowing is not allowed or provided borrowing period is bigger than max. |
LicenseSpring.SignatureMismatchException | In case signature returned by LicenseSpring backend is not valid or missing |
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.CanBorrow | ( | ) |
Is this license can be borrowed or not
Equivalent to check MaxBorroTime() > 0. Meaningful only for floating licenses.
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.ChangePassword | ( | string | password, |
string | newPassword | ||
) |
Change password for user-based license
Does the same as LicenseManager.ChangePassword
password | User password |
newPassword | New password |
InvalidOperationException | In case method was called for key-based license |
System.Security.Authentication.InvalidCredentialException | In case of wrong password |
LicenseSpring.PasswordChangeNotAllowedException | If changing password is forbidden |
LicenseSpring.MissingParametersException | If password or newPassword is empty |
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. |
LicenseSpring.UnknownLicenseSpringException | In rare case if something went wrong. |
Implemented in LicenseSpring.License.
InstallationFile LicenseSpring.ILicense.Check | ( | IInstallationFileOptions | options = null | ) |
Check current license for validity on the LicenseSpring platform
options | Optional, using options you can filter install files by channel and environment. |
InstallationFile
available for the license (useful for managing software updates). Returns null in case request failed and grace period started.LicenseSpring.LicenseInactiveException | Thrown when license is inactive |
LicenseSpring.LicenseDisabledException | Thrown when license is disabled |
LicenseSpring.LicenseExpiredException | Thrown when license is expired |
LicenseSpring.MaxFloatingReachedException | In case all floating slots are busy. |
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. |
LicenseSpring.UnknownLicenseSpringException | In rare case if something went wrong. |
Implemented in LicenseSpring.License.
ConsumptionPeriod LicenseSpring.ILicense.ConsumptionPeriod | ( | ) |
Period of time after which consumption is reset.
Meaningful only for Consumption license.
Implemented in LicenseSpring.License.
CustomField[] LicenseSpring.ILicense.CustomFields | ( | ) |
Custom data fields available for the license
Implemented in LicenseSpring.License.
int LicenseSpring.ILicense.DaysPassedSinceLastCheck | ( | ) |
How many days passed since last online check
Implemented in LicenseSpring.License.
int LicenseSpring.ILicense.DaysRemaining | ( | ) |
How many days remaining till license expires in current time zone
Days counter will be changed in local midnight.
If you are going to show days remaining dialog to end user you should use this method instead of UTC counterpart. For Subscription license it also counts grace period if set.
Implemented in LicenseSpring.License.
int LicenseSpring.ILicense.DaysRemainingUTC | ( | ) |
How many days remaining till license expires
Days counter will be changed in midnight by UTC. 0 means license expires today. For Subscription license it also counts grace period if set.
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.Deactivate | ( | bool | removeLocalData = false | ) |
Deactivate current license
removeLocalData | Whether should remove local license and folders created by the SDK, by default false.Equivalent to call LicenseManager.ClearLocalStorage after deactivation. |
If you are going to uninstall your application you probably should call LicenseManager.ClearLocalStorage afterwards or just set removeLocalData param to true.
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. |
LicenseSpring.UnknownLicenseSpringException | In rare case if something went wrong. |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.DeactivateAirGap | ( | string | confirmationCode | ) |
Verify Confirmation code and deactivate air gap license
Available only in .NET Framework 4.7 or greater, .NET Standard, .NET 5.0 and later versions.
confirmationCode | Code received from the air gap activation portal |
LicenseSpring.LicenseSpringException | If feature not supported for current target Framework |
LicenseSpring.AirGapActivationException | In case confirmation code from the air gap activation portal is invalid. |
Implemented in LicenseSpring.License.
string LicenseSpring.ILicense.DeactivateOffline | ( | string | deactivationRequestFile = null | ) |
Deactivate license locally and create offline deactivation file request
If you are going to uninstall your application you probably should call LicenseManager.ClearLocalStorage afterwards.
deactivationRequestFile | Deactivation request file path, null means use default path (Desktop) |
Implemented in LicenseSpring.License.
DeviceVariable LicenseSpring.ILicense.DeviceVariable | ( | string | name | ) |
Get device variable by name
Returns empty device variable if the variable does not exist
Implemented in LicenseSpring.License.
string LicenseSpring.ILicense.DeviceVariableValue | ( | string | name | ) |
Get device variable value by name
name | Device variable name |
Implemented in LicenseSpring.License.
LicenseFeature LicenseSpring.ILicense.Feature | ( | string | featureCode | ) |
Get product (license) feature by feature code
featureCode | Feature identifier (code) |
Implemented in LicenseSpring.License.
LicenseFeature[] LicenseSpring.ILicense.Features | ( | ) |
Product features available for the license
Implemented in LicenseSpring.License.
string LicenseSpring.ILicense.FloatingClientId | ( | ) |
Floating user (client) or instance id
Meaningful only for offline floating license.
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.FloatingEndDateTime | ( | ) |
Floating license validity end date time in local time zone
Meaningful only for floating licenses, if license is borrowed this method returns borrowedUntil date time.
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.FloatingEndDateTimeUtc | ( | ) |
Floating license validity end date time in UTC
Meaningful only for floating licenses, if license is borrowed this method returns borrowedUntil date time in UTC.
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.FloatingSlotsCount | ( | ) |
Overall Floating slots or users count. Amount of simultaneous users (instances) allowed for this license.
Meaningful only for Floating license.
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.FloatingSlotsInUse | ( | ) |
Current floatings slots in use count, including this user (instance).
Meaningful only for Floating license, please query this value only after online license check or registration (for Offline floating).
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.FloatingTimeout | ( | ) |
Floating timeout in minutes
Meaningful only for Floating license.
Implemented in LicenseSpring.License.
string LicenseSpring.ILicense.GetAirGapDeactivationCode | ( | string | initializationCode | ) |
Get air gap Deactivation code.
Available only in .NET Framework 4.7 or greater, .NET Standard, .NET 5.0 and later versions.
initializationCode | Code received from the air gap activation portal. |
LicenseSpring.LicenseSpringException | If feature not supported for current target Framework |
Implemented in LicenseSpring.License.
DeviceVariable[] LicenseSpring.ILicense.GetDeviceVariables | ( | bool | getFromBackend = false | ) |
Get device variables from the local license or from the backend
This method does not throw exceptions if you getting variables list from local license.
getFromBackend | Indicates if you want to request device variables list from local license or backend |
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.License.
ProductDetails LicenseSpring.ILicense.GetProductDetails | ( | ) |
Get information about a product this license belongs to
ProductDetails is always available for offline activated license.
This method does not perform any network requests and does not throw exceptions.
ProductDetails
or null if ProductDetails
not present in current licenseImplemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.GracePeriodEndDateTime | ( | ) |
Getter for grace period end date time in local time
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.GracePeriodEndDateTimeUTC | ( | ) |
Getter for grace period end date time in UTC
Implemented in LicenseSpring.License.
double LicenseSpring.ILicense.GracePeriodHoursRemaining | ( | ) |
How many hours remaining till grace period ends
Implemented in LicenseSpring.License.
LicenseID LicenseSpring.ILicense.Id | ( | ) |
License ID
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsAirGapped | ( | ) |
Is this license was activated using air-gap activation
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsBorrowed | ( | ) |
Checker for whether the license is borrowed
Meaningful only for Floating license, see License.Borrow
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsConsumptionOverageAllowed | ( | ) |
Is it allowed to exceed consumption for this license.
Meaningful only for Consumption based license.
MaxConsumption
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsConsumptionResetEnabled | ( | ) |
Indicates whether consumption resets after a certain period of time.
Meaningful only for Consumption license.
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsDeviceTransferAllowed | ( | ) |
Checks if license can be transfered between devices
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsDeviceTransferLimited | ( | ) |
Checks if the license allows only limited number of transfers between devices
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsExpired | ( | ) |
Is license expired
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsFloating | ( | ) |
Is this license floating
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsGracePeriodStarted | ( | ) |
Check if grace period started for a license
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsMaintenancePeriodExpired | ( | ) |
Is maintenance period expired
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsOfflineActivated | ( | ) |
Is this license was activated offline
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsSubscriptionGracePeriodStarted | ( | ) |
Check if grace period started for subscription license
Meaningful only for Subscription licenses
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsTrial | ( | ) |
Is this license trial
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsUnlimitedConsumptionAllowed | ( | ) |
Is unlimited consumption allowed for the license
Meaningful only for Consumption based license.
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.IsValid | ( | ) |
Fast and simple way to check current local state of the license.
Equivalent to Status().IsOk() and !IsExpired()
It's just basic check, you cannot be 100% sure that license is valid without online license check.
So you still need to perform license check (both local and online) from time to time.
Implemented in LicenseSpring.License.
string LicenseSpring.ILicense.Key | ( | ) |
License key
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.LastCheckDate | ( | ) |
The DateTime of the last sync with the LicenseSpring platform
In other words - DateTime of the last online license check.
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.LastCheckDateUTC | ( | ) |
The DateTime of the last sync with the LicenseSpring platform
In other words - DateTime of the last online license check.
Implemented in LicenseSpring.License.
LicenseUser LicenseSpring.ILicense.LicenseUser | ( | ) |
void LicenseSpring.ILicense.LocalCheck | ( | ) |
Perform check for license validity locally
Local check do not establish any connections to the LicenseSpring platform, so it can be used in offline mode.
LicenseSpring.LicenseInactiveException | Thrown when license is inactive |
LicenseSpring.LicenseDisabledException | Thrown when license is disabled |
LicenseSpring.LicenseExpiredException | Thrown when license is expired |
LicenseSpring.ProductMismatchException | Thrown when license product code does not correspond to configuration product code |
LicenseSpring.DeviceNotLicensedException | Thrown when computer hardware configuration has been changed or license does not belong to this computer |
LicenseSpring.DateTimeCheatingException | Thrown when detected that system time was set back |
Implemented in LicenseSpring.License.
int LicenseSpring.ILicense.MaintenanceDaysRemaining | ( | ) |
How many days remaining till maintenance period expires in current time zone
Days counter will be changed in local midnight.
Returns int.MaxValue in case maintenance period unlimited or not specified.
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.MaintenancePeriod | ( | ) |
Maintenance period for the license
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.MaintenancePeriodUTC | ( | ) |
Maintenance period for the license
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.MaxActivations | ( | ) |
How many times license can be activated
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.MaxBorrowTime | ( | ) |
Maximum borrowing period in hours
Meaningful only for floating license.
Implemented in LicenseSpring.License.
int LicenseSpring.ILicense.MaxConsumption | ( | ) |
Maximum consumption of the license
Meaningful only for Consumption based license.
Implemented in LicenseSpring.License.
int LicenseSpring.ILicense.MaxConsumptionOverage | ( | ) |
Extra amount of consumption that allows to go over MaxConsumption
.
Meaningful only for Consumption based license.
Implemented in LicenseSpring.License.
string LicenseSpring.ILicense.Metadata | ( | ) |
Customer LicenseSpring.ILicense.Owner | ( | ) |
Gets the information about license owner, commonly it's a person or organization associated with the license
Please note some fields of the Customer object can be empty or null(unavailable)
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.PolicyId | ( | ) |
License Policy id
Currently meaningful only for air-gap activated license.
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.Register | ( | ) |
Register floating license and occupy floating slot.
This is equivalent to check license online. See aslo SetupLicenseWatchdog. In order to keep floating license alive you should check in (register) it periodically.
LicenseSpring.LicenseInactiveException | Thrown when license is inactive |
LicenseSpring.LicenseDisabledException | Thrown when license is disabled |
LicenseSpring.LicenseExpiredException | Thrown when license is expired |
LicenseSpring.MaxFloatingReachedException | In case all floating slots are busy. |
LicenseSpring.SignatureMismatchException | In case signature returned by LicenseSpring backend is not valid |
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. |
LicenseSpring.UnknownLicenseSpringException | In rare case if something went wrong. |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.Release | ( | bool | throwExceptions = false | ) |
Stop license watchdog thread and revoke floating license so other user can use it.
It's important to call this function if you use floating license or watchdog.
Typically should be called at the end of app execution.
throwExceptions | Boolean value indicating whether this method should throw exceptions, by default it's false. |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.ResumeLicenseWatchdog | ( | ) |
Restart background thread, you can call this within you callback in order to resume periodic license checks.
Using this function is a little faster than running new watchdog. Does nothing if watchdog was not set up.
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.SendDeviceVariables | ( | ) |
Send current device variables list to the backend (see device variables on the platform)
Please note this data will be linked to the current running device ID.
This method does nothing if local license does not have any variables.
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. |
LicenseSpring.UnknownLicenseSpringException | In rare case if something went wrong. |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.SetupLicenseWatchdog | ( | LicenseWatchdogCallback | callback, |
uint | timeout = 0 |
||
) |
Setup and run license watchdog, a background thread which periodically checks the license, by so keeping it alive.
This is especially useful for floating licenses, but can be used for any.
callback | This function will be called back in case of errors. |
timeout | Timeout in minutes, 0 means use default |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.SetupLicenseWatchdog | ( | LicenseWatchdogSettings | settings | ) |
Setup and run license watchdog, a background thread which periodically checks the license, by so keeping it alive.
This is especially useful for floating licenses, but can be used for any.
settings | Watchdog settings. |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.SetWatchdogTimeout | ( | uint | timeout = 0 | ) |
Set new timout for license watchdog.
This method does not restart the watchdog, it sets a new timeout for the running watchdog or before calling ResumeLicenseWatchdog.
timeout | Timeout in minutes, 0 means use default |
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.StartDate | ( | ) |
License start date
Implemented in LicenseSpring.License.
LicenseStatus LicenseSpring.ILicense.Status | ( | ) |
Method for getting local license status, see LicenseStatus documentation
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.StopLicenseWatchdog | ( | ) |
Stops license watchdog background thread.
This method does not revoke floating license, just stops the watchdog.
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.SubscriptionGracePeriod | ( | ) |
Grace period in hours
Meaningful only for Subscription license.
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.SyncConsumption | ( | OverageRequest | overageRequest = null | ) |
Sync Consumption license with the LicenseSpring platform
Meaningful only for Consumption based license.
Also consumption license gets updated within online check, so you can call Check
instead.
overageRequest | Optional parameter to request consumption overage, see OverageRequest |
System.InvalidOperationException | Thrown when called for not Consumption license type |
LicenseSpring.NotEnoughConsumptionException | Thrown when license is out of resources |
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. |
LicenseSpring.SignatureMismatchException | In case signature returned by LicenseSpring backend is not valid or missing |
LicenseSpring.UnknownLicenseSpringException | In rare case if something went wrong. |
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.SyncFeatureConsumption | ( | string | featureCode = null | ) |
Sync Consumption feature with the LicenseSpring platform
Meaningful only for Consumption features.
Also consumption features gets updated within online check, so you can call Check
instead.
LicenseSpring.NotEnoughConsumptionException | Thrown when license feature is out of resources |
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. |
LicenseSpring.SignatureMismatchException | In case signature returned by LicenseSpring backend is not valid or missing |
LicenseSpring.UnknownLicenseSpringException | In rare case if something went wrong. |
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.TimesActivated | ( | ) |
How many times license already been activated
Implemented in LicenseSpring.License.
int LicenseSpring.ILicense.TotalConsumption | ( | ) |
Current total consumption of the license
Meaningful only for Consumption based license.
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.TransferCount | ( | ) |
How many times license has been transferred between devices
Implemented in LicenseSpring.License.
uint LicenseSpring.ILicense.TransferLimit | ( | ) |
Maximum number of allowed license transfers between devices
Implemented in LicenseSpring.License.
LicenseType LicenseSpring.ILicense.Type | ( | ) |
void LicenseSpring.ILicense.UpdateConsumption | ( | int | value = 1 | ) |
Increase local consumption counter for consumption license
Meaningful only for Consumption based license.
value | The value by which the counter is being increased, default is 1. |
System.InvalidOperationException | Thrown when called for not Consumption license type |
LicenseSpring.NotEnoughConsumptionException | Thrown when license is out of resources |
Implemented in LicenseSpring.License.
void LicenseSpring.ILicense.UpdateFeatureConsumption | ( | string | featureCode, |
int | value = 1 |
||
) |
Increase local consumption counter for consumption product feature.
Meaningful only for Consumption product features.
featureCode | Feature identifier (code). |
value | The value by which the counter is being increased, default is 1. |
LicenseSpring.InvalidLicenseFeatureException | Thrown when license feature not found or it's not of cosumption type |
LicenseSpring.NotEnoughConsumptionException | Thrown when license feature is out of resources |
Implemented in LicenseSpring.License.
bool LicenseSpring.ILicense.UpdateOffline | ( | string | path | ) |
Update license data accordingly to provided file.
path | Update file path |
System.IO.FileNotFoundException | If file cannot be found |
System.IO.InvalidDataException | If file content is empty or invalid |
LicenseSpring.SignatureMismatchException | In case signature in the file is not valid or missing |
Implemented in LicenseSpring.License.
string LicenseSpring.ILicense.User | ( | ) |
Email of the License user
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.ValidityPeriod | ( | ) |
The DateTime until the license is valid
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.ValidityPeriodUTC | ( | ) |
The DateTime until the license is valid
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.ValidityWithGracePeriod | ( | ) |
The DateTime until the license is valid including grace period
Currently grace period meaningful only for Subscription licenses
Implemented in LicenseSpring.License.
DateTime LicenseSpring.ILicense.ValidityWithGracePeriodUTC | ( | ) |
The DateTime until the license is valid including grace period
Currently grace period meaningful only for Subscription licenses
Implemented in LicenseSpring.License.