LicenseSpring .Net SDK 7.32.1
Easily add Software Licensing to your application
Loading...
Searching...
No Matches
LicenseSpring.Configuration Class Reference

Configuration of the SDK. More...

Inheritance diagram for LicenseSpring.Configuration:
LicenseSpring.IConfiguration

Public Member Functions

 Configuration ()
 Configuration default constructor, creates invalid configuration with empty Shared/API keys and OAuth credentials.
 
 Configuration (OAuthCredentials oAuthCredentials, string productCode, string appName, string appVersion, ExtendedOptions extendedOptions=null)
 Configuration constructor used when initializing the LicenseManager with OAuth authentication method.
 
 Configuration (string apiKey, string sharedKey, string productCode, string appName, string appVersion, ExtendedOptions extendedOptions=null)
 Configuration constructor.
 

Static Public Member Functions

static bool IsMonoRuntime ()
 Check if application is running in Mono runtime.
 

Properties

string AirGapPublicKey [get, set]
 Public key for air gap activation acquired from LicenseSpring.
 
string ApiKey [get, set]
 API key acquired from LicenseSpring.
 
string AppName [get, set]
 Your application name.
 
string AppVersion [get, set]
 Your application version.
 
string ClientId [get]
 OAuth client id.
 
string ClientSecret [get]
 OAuth client secret.
 
bool CollectNetworkInfo [get]
 Whether SDK should send hostname, local IP and MAC to the platfrom.
 
ICryptoProvider CryptoProvider [get, set]
 CryptoProvider of the configuration.The SDK uses it internally and you can also use it in your codebase.
 
string CustomerAccount [get, set]
 Customer group(account) code that is required for SSO.Meaningful for user-based auth only.
 
string DetectedVMName [get]
 In case VM detection enabled returns hypervisor name.
 
ExtendedOptions ExtendedOptions [get, set]
 Extended options of the configuration.Attention: changing some fields of the extended options indirectly won't take effect. For example config.ExtendedOptions.LicenseFilePath = "..." will not work.
 
uint GracePeriod [get]
 Grace period.In hours, default is 48 hours.
 
string HardwareID [get]
 Hardware ID of the device.
 
string Hostname [get, set]
 Hostname.
 
bool IsLoggingEnabled [get]
 Whether SDK should log licensing activity to file.
 
bool IsOAuth = false [get]
 Returns true if OAuth constructor was used to instantiate the configuration object, false if standard api/shared key pair was used.
 
bool IsVM [get]
 In case VM detection enabled returns true if app currently running in virtualized environment.
 
bool IsVMDetectionEnabled [get]
 Whether detection of Virtual machines is enabled.
 
uint LicenseSpringAPIVersion [get]
 LicenseSpring API version.Note this is the API version that SDK uses.
 
string LocalIp [get, set]
 Local IP address.
 
string MACAddress [get, set]
 MAC address.
 
int NetworkTimeout [get, set]
 Get network operation timeout in seconds, 0 means use system defaults.
 
string OSVersion [get, set]
 OS Version.
 
string ProductCode [get, set]
 Product code acquired from LicenseSpring.
 
ProxySettings Proxy [get, set]
 Get proxy configuration.
 
string SdkVersion [get]
 LicenseSpring SDK version.
 
string SharedKey [get, set]
 Shared or Management key acquired from LicenseSpring.
 
- Properties inherited from LicenseSpring.IConfiguration

Detailed Description

Configuration of the SDK.

Constructor & Destructor Documentation

◆ Configuration() [1/2]

LicenseSpring.Configuration.Configuration ( string  apiKey,
string  sharedKey,
string  productCode,
string  appName,
string  appVersion,
ExtendedOptions  extendedOptions = null 
)

Configuration constructor.

Parameters
apiKeyYour API key that you got from LicenseSpring platform
sharedKeyYour Shared key that you got from LicenseSpring platform
productCodeYour product code
appNameYour application name
appVersionYour application version
extendedOptionsInstance of the ExtendedOptions, optionally
Exceptions
System.ArgumentExceptionThrown in case of empty API or Shared keys, invalid prouct code
LicenseSpring.ConfigurationExceptionThrown in case of invalid proxy settings

◆ Configuration() [2/2]

LicenseSpring.Configuration.Configuration ( OAuthCredentials  oAuthCredentials,
string  productCode,
string  appName,
string  appVersion,
ExtendedOptions  extendedOptions = null 
)

Configuration constructor used when initializing the LicenseManager with OAuth authentication method.

WARNING: you must provide oAuthCredentials.CryptoProviderKey if you intend to use the default sdk cryptography.

Parameters
oAuthCredentialsContainer for OAuth client id and secret.
productCodeYour product code.
appNameYour application name.
appVersionYour application version.
extendedOptionsInstance of the ExtendedOptions, optional.
Exceptions
System.ArgumentExceptionThrown in case of empty client id, secret, or invalid prouct code.
LicenseSpring.ConfigurationExceptionThrown in case of invalid proxy settings.

Member Function Documentation

◆ IsMonoRuntime()

static bool LicenseSpring.Configuration.IsMonoRuntime ( )
static

Check if application is running in Mono runtime.

Returns
True if Mono runtime detected and false otherwise

Property Documentation

◆ AirGapPublicKey

string LicenseSpring.Configuration.AirGapPublicKey
getset

Public key for air gap activation acquired from LicenseSpring.

Implements LicenseSpring.IConfiguration.

◆ ApiKey

string LicenseSpring.Configuration.ApiKey
getset

API key acquired from LicenseSpring.

Implements LicenseSpring.IConfiguration.

◆ AppName

string LicenseSpring.Configuration.AppName
getset

Your application name.

Implements LicenseSpring.IConfiguration.

◆ AppVersion

string LicenseSpring.Configuration.AppVersion
getset

Your application version.

Implements LicenseSpring.IConfiguration.

◆ ClientId

string LicenseSpring.Configuration.ClientId
get

OAuth client id.

Implements LicenseSpring.IConfiguration.

◆ ClientSecret

string LicenseSpring.Configuration.ClientSecret
get

OAuth client secret.

Implements LicenseSpring.IConfiguration.

◆ CollectNetworkInfo

bool LicenseSpring.Configuration.CollectNetworkInfo
get

Whether SDK should send hostname, local IP and MAC to the platfrom.

Implements LicenseSpring.IConfiguration.

◆ CryptoProvider

ICryptoProvider LicenseSpring.Configuration.CryptoProvider
getset

CryptoProvider of the configuration.The SDK uses it internally and you can also use it in your codebase.

Implements LicenseSpring.IConfiguration.

◆ CustomerAccount

string LicenseSpring.Configuration.CustomerAccount
getset

Customer group(account) code that is required for SSO.Meaningful for user-based auth only.

Implements LicenseSpring.IConfiguration.

◆ DetectedVMName

string LicenseSpring.Configuration.DetectedVMName
get

In case VM detection enabled returns hypervisor name.

Implements LicenseSpring.IConfiguration.

◆ ExtendedOptions

ExtendedOptions LicenseSpring.Configuration.ExtendedOptions
getset

Extended options of the configuration.Attention: changing some fields of the extended options indirectly won't take effect. For example config.ExtendedOptions.LicenseFilePath = "..." will not work.

Implements LicenseSpring.IConfiguration.

◆ GracePeriod

uint LicenseSpring.Configuration.GracePeriod
get

Grace period.In hours, default is 48 hours.

Implements LicenseSpring.IConfiguration.

◆ HardwareID

string LicenseSpring.Configuration.HardwareID
get

Hardware ID of the device.

Implements LicenseSpring.IConfiguration.

◆ Hostname

string LicenseSpring.Configuration.Hostname
getset

Hostname.

Implements LicenseSpring.IConfiguration.

◆ IsLoggingEnabled

bool LicenseSpring.Configuration.IsLoggingEnabled
get

Whether SDK should log licensing activity to file.

Implements LicenseSpring.IConfiguration.

◆ IsOAuth

bool LicenseSpring.Configuration.IsOAuth = false
get

Returns true if OAuth constructor was used to instantiate the configuration object, false if standard api/shared key pair was used.

Implements LicenseSpring.IConfiguration.

◆ IsVM

bool LicenseSpring.Configuration.IsVM
get

In case VM detection enabled returns true if app currently running in virtualized environment.

Implements LicenseSpring.IConfiguration.

◆ IsVMDetectionEnabled

bool LicenseSpring.Configuration.IsVMDetectionEnabled
get

Whether detection of Virtual machines is enabled.

Implements LicenseSpring.IConfiguration.

◆ LicenseSpringAPIVersion

uint LicenseSpring.Configuration.LicenseSpringAPIVersion
get

LicenseSpring API version.Note this is the API version that SDK uses.

Implements LicenseSpring.IConfiguration.

◆ LocalIp

string LicenseSpring.Configuration.LocalIp
getset

Local IP address.

Implements LicenseSpring.IConfiguration.

◆ MACAddress

string LicenseSpring.Configuration.MACAddress
getset

MAC address.

Implements LicenseSpring.IConfiguration.

◆ NetworkTimeout

int LicenseSpring.Configuration.NetworkTimeout
getset

Get network operation timeout in seconds, 0 means use system defaults.

Implements LicenseSpring.IConfiguration.

◆ OSVersion

string LicenseSpring.Configuration.OSVersion
getset

OS Version.

Implements LicenseSpring.IConfiguration.

◆ ProductCode

string LicenseSpring.Configuration.ProductCode
getset

Product code acquired from LicenseSpring.

Implements LicenseSpring.IConfiguration.

◆ Proxy

ProxySettings LicenseSpring.Configuration.Proxy
getset

Get proxy configuration.

Implements LicenseSpring.IConfiguration.

◆ SdkVersion

string LicenseSpring.Configuration.SdkVersion
get

LicenseSpring SDK version.

Implements LicenseSpring.IConfiguration.

◆ SharedKey

string LicenseSpring.Configuration.SharedKey
getset

Shared or Management key acquired from LicenseSpring.

Implements LicenseSpring.IConfiguration.


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