AP&C API Reference
Public Member Functions | Properties | List of all members
Apac.Licensing.KeySet Class Reference

Provides a set of keys with a searching facility to ease application code that needs to look up license keys. More...

Inheritance diagram for Apac.Licensing.KeySet:

Public Member Functions

bool IsFeatureLicensed (LicensedFeatures feature)
 Indicates whether the requested feature is licensed or not. More...
 
void Add (Key key)
 Indicates whether the requested feature is licensed or not given the context and the current count the requester provides. This call is used to support distributed checkouts against centralized and generalized floating licenses (ie: IDA Client leases for many different banks licensed in one place). More...
 
int GetNumLeases (LicensedFeatures name)
 Indicates how many leases are available for the feature. More...
 
KeySet GetMatchingKeys (string contextid, string[] nodeids)
 Gets all matching license keys from the set of keys. More...
 
Key Find (KeySearchHandler match)
 Search routine for finding a specific key. More...
 
Key[] FindAll (KeySearchHandler match)
 Search routine for finding a specific keys. More...
 
Key Find (FeatureSearchHandler match)
 
Key[] FindAll (FeatureSearchHandler match)
 
void Visit (KeyVisitorHandler visitor)
 
void Lock ()
 Locks the KeySet. More...
 
void Clear ()
 Clears the KeySet, if it has not been locked. More...
 
Key[] ToArray ()
 
IEnumerator< KeyGetEnumerator ()
 

Properties

int Count [get]
 
bool Locked [get]
 Gets the property indicating if the KeySet has been locked. More...
 

Detailed Description

Provides a set of keys with a searching facility to ease application code that needs to look up license keys.

Member Function Documentation

◆ Add()

void Apac.Licensing.KeySet.Add ( Key  key)
inline

Indicates whether the requested feature is licensed or not given the context and the current count the requester provides. This call is used to support distributed checkouts against centralized and generalized floating licenses (ie: IDA Client leases for many different banks licensed in one place).

Parameters
contextThe context for which the license is needed.
featureThe feature for which the license is needed.
currentCountThe count of features currently in use in the context.
Returns
Returns true if the feature can be used, false if it cannot.

Convenience method for adding a key to the dictionary without having to

Parameters
key

◆ Clear()

void Apac.Licensing.KeySet.Clear ( )
inline

Clears the KeySet, if it has not been locked.

◆ Find()

Key Apac.Licensing.KeySet.Find ( KeySearchHandler  match)
inline

Search routine for finding a specific key.

Parameters
matchThe delegate used to determine the match.
Returns
Returns the first matching key or null.

◆ FindAll()

Key [] Apac.Licensing.KeySet.FindAll ( KeySearchHandler  match)
inline

Search routine for finding a specific keys.

Parameters
matchThe delegate used to determine the match.
Returns
Returns an array of all matching keys.

◆ GetMatchingKeys()

KeySet Apac.Licensing.KeySet.GetMatchingKeys ( string  contextid,
string[]  nodeids 
)
inline

Gets all matching license keys from the set of keys.

Parameters
contextidThe context identifier for the required keys.
nodeidsThe array of node identifiers for the required keys.
Returns
Returns an array of Keys that match contextid and at least one of nodeids , or an empty array if no matches were found.

◆ GetNumLeases()

int Apac.Licensing.KeySet.GetNumLeases ( LicensedFeatures  name)
inline

Indicates how many leases are available for the feature.

Parameters
nameThe LicensedFeatures instance being queried.
Returns
Returns the number of leases that the feature's license key supports.

◆ IsFeatureLicensed()

bool Apac.Licensing.KeySet.IsFeatureLicensed ( LicensedFeatures  feature)
inline

Indicates whether the requested feature is licensed or not.

Parameters
featureThe LicensedFeatures instance being queried.
Returns
Returns true if the feature can be used, false if the feature cannot be used.

◆ Lock()

void Apac.Licensing.KeySet.Lock ( )
inline

Locks the KeySet.

Property Documentation

◆ Locked

bool Apac.Licensing.KeySet.Locked
get

Gets the property indicating if the KeySet has been locked.


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