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

Loading...
Searching...
No Matches
Classes | Enumerations | Functions
LicenseSpring Namespace Reference

## Classes
class | ActivationFileException
| In case invalid file was provided for offline activation. More...
class | AirGapActivationException
| This exception can arise if confirmation code from the air gap activation portal is invalid. More...
class | ApiKeyException
| Base exception class for issues with API key. More...
class | ApiKeyProductNotAllowedException
| This exception can arise if provided API key doesn't have access to configured product. More...
class | APINotFoundException
| In case API endpoint stopped responding. More...
class | AppVersionNotFoundException
| In case requested app version does not exist. More...
class | BaseManager
| Base class for License management. More...
class | BorrowLicenseException
| This exception can arise if provided borrowing period bigger than max possible. Or if license borrowing is not allowed. More...
class | BundleManager
| Class for managing bundle licenses. A bundle allows activating multiple product licenses together as a single unit. Implements `IBundleManager` interface. More...
class | BundleMismatchException
| Thrown when a bundle-related response does not contain a license that exists locally. This can happen when the activation response contains unexpected product codes. More...
class | CannotBeActivatedNowException
| Rare exception, this exception can be thrown if start date field is set for the license and current date is behind start date. More...
class | Company
| Class that encapsulates information about a company on the LicenseSpring backend. More...
class | Configuration
| Configuration of the SDK. More...
class | ConfigurationException
| Indicates if something is wrong on configuration stage E.g. wrong API or Shared key. More...
class | ConfigurationFactory
| LicenseSpring ConfigurationFactory class. More...
class | ConsumptionPeriodExtensions
| Helper class, provides ConsumptionPeriod conversion to and from string. More...
class | CryptoProvider
| Default CryptoProvider class, implements `ICryptoProvider` interface. More...
class | Customer
| Class that encapsulates information about the customer. More...
class | CustomerNotFoundException
| This exception can arise if given customer does not exist on the server. More...
class | CustomField
| Class that holds information about custom data fields. More...
class | DateHeaderInvalidException
| This exception can arise if system clock is misconfigured. More...
class | DateTimeCheatingException
| Detected that system clock has been set back. More...
class | DeviceBlacklistedException
| This exception can arise during license check if device has been blacklisted by Product manager. More...
class | DeviceNotLicensedException
| In case the proper license key is passed, but it is issued to a different device. More...
class | DeviceVariable
| Class that holds information about device variables. More...
class | ExtendedOptions
| Class for storing useful settings that the Configuration object will include. More...
class | FeatureNotFloatingException
| Thrown when trying to release a non-floating license feature. More...
class | FloatingClient
| Class for interaction with offline Floating server. More...
class | FloatingFeatureDeviceNotInUseException
| Thrown when trying to release floating license feature that was not previously registered. More...
class | FloatingServerInfo
| Implements `IFloatingServerInfo` interface. More...
class | FloatingTimeoutExpiredException
| In case floating timeout is expired. More...
class | HardwareKeyException
| Thrown on problems with hardware key. More...
class | HardwareKeyOptions
| Class for managing Hardware Key (YubiKey PIV) specific options. More...
interface | IBundleManager
| BundleManager interface for managing bundle licenses. A bundle allows activating multiple product licenses together as a single unit. More...
interface | IConfiguration
| Configuration interface. More...
interface | IConfigurationFactory
| ConfigurationFactory interface. More...
interface | ICryptoProvider
| CryptoProvider interface. More...
interface | ICustomer
| Customer interface. More...
interface | ICustomField
| CustomField interface. More...
interface | IDeviceVariable
| DeviceVariable interface. Contains data about device variables. Allows the application to collect custom data and send it back to the LicenseSpring platform. Collect data like fields from a customer registration form, error codes, system information or anything else that the SDK is not collecting by default. More...
interface | IExtendedOptions
| ExtendedOptions interface. More...
interface | IFloatingClient
| FloatingClient interface. More...
interface | IFloatingServerInfo
| FloatingServerInfo interface. More...
interface | IInstallationFile
| InstallationFile interface. More...
interface | IInstallationFileOptions
| InstallationFileOptions interface. More...
interface | ILicense
| License interface. More...
interface | ILicenseFeature
| LicenseFeature interface. More...
interface | ILicenseID
| LicenseID interface, see `LicenseID` class. More...
interface | ILicenseIDFactory
| LicenseIDFactory interface, in use for unmanaged and COM clients. More...
interface | ILicenseManager
| LicenseManager interface. More...
interface | ILicenseManagerFactory
| LicenseManagerFactory interface, in use for unmanaged and COM clients. More...
interface | ILicenseStatus
| LicenseStatus interface. More...
interface | ILicenseStorage
| LicenseStorage interface. More...
interface | ILicenseUser
| License user interface. More...
interface | ILicenseWatchdogSettings
| LicenseWatchdogSettings interface. More...
class | InstallationFile
| Class that holds information about setup file of your app. More...
class | InstallationFileOptions
| Class that holds optional parameters when requesting InstallationFile info. More...
class | InvalidApiKeyException
| This exception can arise if provided API key is invalid. More...
class | InvalidAuthMethodException
| This exception can be thrown in case of wrong API. More...
class | InvalidLicenseFeatureCodeException
| Thrown when trying to register a non-existent floating license feature. More...
class | InvalidLicenseFeatureException
| Throws when feature does not exist or wrong feature type provided. More...
interface | IOverageRequest
| OverageRequest interface. More...
interface | IProductDetails
| ProductDetails interface. More...
interface | IProxySettings
| ProxySettings interface. More...
interface | IVersionInfo
| LatestVersion interface. More...
class | License
| License class, implements `ILicense` interface. More...
class | LicenseActivationException
| In case something went wrong with license activation. More...
class | LicenseDeletedException
| In case license was deleted from the backend by admin. More...
class | LicenseDisabledException
| In case license has been disabled. More...
class | LicenseExpiredException
| In case license is expired. More...
class | LicenseFeature
| License feature. More...
class | LicenseFileStorage
| Class that saves license in a file, implements `ILicenseStorage` interface. More...
class | LicenseFileStorageEx
| Class that saves license in a file and provides interprocess synchronization for the license file. More...
class | LicenseID
| Class that represents License identifier. More...
class | LicenseIDFactory
| Helper factory class for creating LicenseID objects for COM clients. More...
class | LicenseInactiveException
| In case license has been reset or deactivated. More...
class | LicenseManager
| Class for performing basic requests to LicenseSpring backend and managing licenses. Implements `ILicenseManager` interface. More...
class | LicenseManagerFactory
| Helper factory class for creating LicenseManager and ManagementService. More...
class | LicenseMemoryStorage
| Simple class that stores license data in memory. Implements `ILicenseStorage` interface. More...
class | LicenseNotFoundException
| In case license was not found on the backend. More...
class | LicenseServerException
| In case of internal LicenseSpring backend error, please contact support if you face this exception. More...
class | LicenseSpringException
| General LicenseSpring exception. More...
class | LicenseStateException
| Base exception type for all invalid license state exceptions. Can be thrown in case valid (active) license is required for API call like LicenseManager.GetInstallationFile. More...
class | LicenseStatus
| Class that represents License status and provides info methods like IsActive and IsEnabled. More...
class | LicenseTypeExtensions
| Helper class, provides LicensType conversion to and from string. More...
class | LicenseUser
| Class that encapsulates information about the license user. More...
class | LicenseWatchdogSettings
| Class that holds settings of license watchdog. More...
class | LocalLicenseException
| In case local license is damaged or cannot be loaded or saved. More...
class | MaxFloatingReachedException
| This exception can arise during online check of floating license if reached maximum users count for the license. More...
class | MissingEmailException
| Thrown when email is missing in API call for user-based product. More...
class | MissingParametersException
| This exception can arise in case of missing parameters (e.g. empty password) or API has been changed. More...
class | NegativeConsumptionsNotAllowedException
| Thrown when a consumption license or product feature is negative and the flag to allow negative consumption is not set on the license/feature. More...
class | NetworkException
| A wrapper for all low level network exceptions. More...
class | NotEnoughConsumptionException
| This exceptions means that Consumption license or feature ran out of resources. More...
class | OAuthCredentials
| Container class for OAuth credentials. Used for license manager initialization instead of api/public key. More...
class | OAuthException
| Thrown in case of invalid or expired OAuth credentials. More...
class | OverageRequest
| Class that encapsulates information about overages in consumption licence. More...
class | PasswordChangeNotAllowedException
| This exception can arise if password change is restricted by company policy. More...
class | ProductDetails
| Class that encapsulates information about product details. More...
class | ProductMismatchException
| In case product code in license file does not correspond to configuration product code. More...
class | ProductNotBundleException
| Thrown when sending bundle-related requests for non-bundle products. More...
class | ProductNotFoundException
| In case product does not exist on the platform. More...
class | ProxySettings
| Class for storing settings when using a proxy server. More...
class | ReadOnlyApiKeyException
| This exception can arise if provided API key is readonly. More...
class | RequestDateInvalidException
| This exception can arise if system date time on the current device is incorrectly set. More...
class | RevokedApiKeyException
| This exception can arise if provided API key is revoked. More...
class | SignatureMismatchException
| In case signature returned by LicenseSpring backend is not valid. More...
class | TrialLicenseExpiredException
| In case trial license is expired. More...
class | UnknownLicenseSpringException
| In case LicenseSpring backend returns unexpected error. More...
class | UserLicense
| Contains information about a license for the pertaining user. More...
class | UserLicensesData
| Contains information about a license assigned to a user for the current product. More...
class | UserNotFoundException
| Thrown if a request with a non-existing username is sent to the Floating server v2. More...
class | VersionInfo
| Contains data about product version. More...
class | VMIsNotAllowedException
| This exception can arise on virtual machine when VM detection is enabled but product policy prohibits running on VM. More...

## Enumerations
enum | AirGapCryptographyMode { Auto , BouncyCastle , MsCryptography }
| Specifies how the SDK generates AirGap codes. More...
enum | AuthorizationMethod { Invalid , KeyBased , UserBased }
| Authorization method enumeration. More...
enum | ConsumptionPeriod { None , Daily , Weekly , Monthly , Annually }
| Consumption period enumeration. More...
enum | DeviceIDAlgorithm { Default , Gen1 , Gen2 , Gen3 , WinAlternative , UniqueByUser , CloudPlatformsId , AutoId , HardwareIdGeneratorDefault = 100 , HardwareIdGeneratorWindowsHardwareFingerprintId = 101 , HardwareIdGeneratorWindowsComputerSystemProductId = 102 , HardwareIdGeneratorWindowsCryptographyId = 103 , HardwareIdGeneratorLinuxMachineId = 104 , HardwareIdGeneratorCloudPlatformsId = 105 }
| Type of Device ID algorithm used by the SDK. More...
enum | LicenseType { Perpetual , Subscription , TimeLimited , Consumption , Unknown = 100 }
| License type enumeration. More...

## Functions
delegate void | LicenseWatchdogCallback (LicenseSpringException ex)
| Callback function for reporting check results from License watchdog.

## Detailed Description

main SDK namespace - all public data types belong to this namespace.

## Enumeration Type Documentation

## ◆ AirGapCryptographyMode

enum LicenseSpring.AirGapCryptographyMode

Specifies how the SDK generates AirGap codes.

Enumerator
Auto | Automatically selects either the BouncyCastle.Cryptography library or System.Security.Cryptography.ECDsa based on the operating system. Note: OS detection may be inaccurate if the application does not include an app.manifest file. For more information, see Application manifests .
BouncyCastle | Uses the BouncyCastle.Cryptography library to generate AirGap codes.
MsCryptography | Use System.Security.Cryptography.ECDsa to generate AirGap codes.

## ◆ AuthorizationMethod

enum LicenseSpring.AuthorizationMethod

Authorization method enumeration.

Enumerator
Invalid | Invalid method.
KeyBased | Authorization method based on license keys.
UserBased | Authorization method based on user credentials.

## ◆ ConsumptionPeriod

enum LicenseSpring.ConsumptionPeriod

Consumption period enumeration.

Enumerator
None | No consumption period.
Daily | Daily consumption period.
Weekly | Weekly consumption period.
Monthly | Monthly consumption period.
Annually | Annually consumption period.

## ◆ DeviceIDAlgorithm

enum LicenseSpring.DeviceIDAlgorithm

Type of Device ID algorithm used by the SDK.

If one of the default algorithms fails, the SDK will try to calculate device id in an alternative way (see WinAlternative).

Enumerator
Default | Default device ID calculation algorithm (legacy). On Windows it uses WMI, on Linux machine id files, on Mac IOPlatformUUID.
Gen1 | Generation 1 of device ID algorithm (legacy). Include minor improvements for ID calculation on Windows, on other platforms the same as default. Corresponds to ExtendedOptions.UseNewHardwareID property from previous versions of the SDK.
Gen2 | Generation 2 of device ID algorithm (legacy). Most safer device id algorithm on Windows, on other platforms the same as default. Use this one when you need to access license from app and Windows service.
Gen3 | Generation 3 of device ID algorithm (legacy). The same as Generation 2 but in shorter form. Can be useful for air gap licenses.
WinAlternative | Alternative device id calculation algorithm for Windows, on other platforms the same as default (legacy). Uses uuid from registry or SMBIOS system information on Windows. Can be useful for UWP and self-contained applications.
UniqueByUser | The same as Generation 2 but also include current user (legacy). Can be useful for floating licenses.
CloudPlatformsId | Cloud platforms instance ID algorithm (legacy). Get instance ID for cloud platforms, supported: Azure, AWS, GCP.
AutoId | Device ID algorithm with auto-detection of the platform (legacy). Same as CloudPlatformsId on Azure, AWS, or GCP, otherwise same as Default.
HardwareIdGeneratorDefault | Default hardware ID algorithm for the additional LicenseSpring Hardware ID generator library (new hardware ID generator). Windows: Computer System Product ID (SMBIOS UUID). Linux: Linux machine ID. macOS: System UUID.
HardwareIdGeneratorWindowsHardwareFingerprintId | Windows hardware fingerprint (new hardware ID generator). Queries CPU, motherboard, and disk information via WMI and combines them into a single hardware ID.
HardwareIdGeneratorWindowsComputerSystemProductId | Windows SMBIOS UUID algorithm (new hardware ID generator). Queries the SMBIOS UUID via WMI on Windows, falls back to HardwareIdGeneratorDefault elsewhere. Similar to WinCSProductId, but uses a different hash.
HardwareIdGeneratorWindowsCryptographyId | Windows MachineGuid registry algorithm (new hardware ID generator). Queries the Windows registry for the Microsoft Cryptography MachineGuid, falls back to HardwareIdGeneratorDefault elsewhere. Similar to WindowsCryptographyId, but uses a different hash.
HardwareIdGeneratorLinuxMachineId | Linux Machine ID algorithm (new hardware ID generator). Queries the Linux machine ID.
HardwareIdGeneratorCloudPlatformsId | Cloud instance ID algorithm (new hardware ID generator). Queries the instance ID on AWS, GCP, or Azure. Similar to CloudPlatformsId, but uses a different hash.

## ◆ LicenseType

enum LicenseSpring.LicenseType

License type enumeration.

License type can be perpetual, subscription, time-limited, or consumption.

Enumerator
Perpetual | Perpetual license type.
Subscription | Subscription license type.
TimeLimited | Time-limited license type.
Consumption | Consumption license type.
Unknown | Unknown license type.

## Function Documentation

## ◆ LicenseWatchdogCallback()

delegate void LicenseSpring.LicenseWatchdogCallback | ( | LicenseSpringException | ex | ) |

Callback function for reporting check results from License watchdog.

Parameters

  ex | Exception encountered within watchdog. Is null if the check passed without errors.