Class Licensing
A place for functions related to SDS2 licensing.
Inherited Members
Namespace: DesignData.SDS2.Database
Assembly: DesignData.SDS2.Database.dll
Syntax
public class Licensing
Remarks
The normal program start procedure looks like:
if(!Licensing.HasStoredCredentials)
{
string userName = .. prompt for user name;
string password = .. prompt for password;
Licensing.SetCredentials(userName, password);
}
Licensing.Checkout();
Properties
HasStoredCredentials
Check if SDS2 already has working stored credentials to use, if it does you do not need to prompt and get credentials
Declaration
public static bool HasStoredCredentials { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
The normal program start procedure looks like:
if(!Licensing.HasStoredCredentials)
{
string userName = .. prompt for user name;
string password = .. prompt for password;
Licensing.SetCredentials(userName, password);
}
Licensing.Checkout();
IsLicensed
Returns true if the user has a valid license to run the API
Declaration
public static bool IsLicensed { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
The normal program start procedure looks like:
if(!Licensing.HasStoredCredentials)
{
string userName = .. prompt for user name;
string password = .. prompt for password;
Licensing.SetCredentials(userName, password);
}
Licensing.Checkout();
Methods
Checkout()
Checkout your license for the full run of your program.
Declaration
public static LicenseReturnCode Checkout()
Returns
Type | Description |
---|---|
LicenseReturnCode |
Remarks
There is no checkin, this call is just needed to give you time to prompt for credentials if needed
~Licensing()
A place for functions related to SDS2 licensing.
Declaration
protected ~Licensing()
Remarks
The normal program start procedure looks like:
if(!Licensing.HasStoredCredentials)
{
string userName = .. prompt for user name;
string password = .. prompt for password;
Licensing.SetCredentials(userName, password);
}
Licensing.Checkout();
GetIsLicensed()
Returns true if the user has a valid license to run the API
Declaration
public static bool GetIsLicensed()
Returns
Type | Description |
---|---|
bool |
Remarks
The normal program start procedure looks like:
if(!Licensing.HasStoredCredentials)
{
string userName = .. prompt for user name;
string password = .. prompt for password;
Licensing.SetCredentials(userName, password);
}
Licensing.Checkout();
HasFeature(LicenseFeatures)
Returns true if the user has a valid license to run the given API feature
Declaration
public static bool HasFeature(LicenseFeatures feature)
Parameters
Type | Name | Description |
---|---|---|
LicenseFeatures | feature |
Returns
Type | Description |
---|---|
bool | The API feature to be checked. |
Remarks
The normal program start procedure looks like:
if(!Licensing.HasStoredCredentials)
{
string userName = .. prompt for user name;
string password = .. prompt for password;
Licensing.SetCredentials(userName, password);
}
Licensing.Checkout();
SetCredentials(string, string)
If SDS2 didn't have stored credentials, and you've prompted the user for their license login, you can then pass these credentials to SDS2 and it will use them to checkout a license
Declaration
public static void SetCredentials(string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
string | userName | |
string | password |
Remarks
The normal program start procedure looks like:
if(!Licensing.HasStoredCredentials)
{
string userName = .. prompt for user name;
string password = .. prompt for password;
Licensing.SetCredentials(userName, password);
}
Licensing.Checkout();