Interface IAgentContext
Provides access to information and capabilities for a given Permuted Software Potential Agent.
See IAgentCommenceConfigurationPhase for examples and details of .Configure( ... ) or .EnsureConfigured( ... ) extension methods which can be layered onto this context.
See For(String) for examples and details of how to obtain an IAgentContext.
Namespace: Sp.Agent.Configuration
Assembly: Sp.Agent.dll
Properties
PermutationId
The 5 character permutation short code identifier associated with your Permuted set of Software Potential Agent DLLs.
See For(String) for examples / details of using a Permutation Short Code.
Declaration
string PermutationId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Examples
"abc12"
VendorName
The identifying Vendor Name string associated with your Permuted set of Software Potential Agent DLLs.
Declaration
string VendorName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Examples
"SampleVendor - licensing@samplevendor.com"
Methods
Configure(Func<IAgentCommenceConfigurationPhase, IAgentCompletedConfigurationPhase>)
Enables one to provide a Configuration Expression specifying details of how you wish Licenses to be managed within your system.
May only be called a single time per PermutationId in a given AppDomain.
Declaration
void Configure(Func<IAgentCommenceConfigurationPhase, IAgentCompletedConfigurationPhase> composer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<IAgentCommenceConfigurationPhase, IAgentCompletedConfigurationPhase> | composer | IAgentCommenceConfigurationPhase for details of composing a Configuration Expression appropriate to your application style/environment using the fluent expression composition sequence. |
Remarks
Failing to call Configure() will result in a Default Configuration (without any License Stores) being applied at the first point where the any of the following events occur:
- Protected code is executed within the current
AppDomainwhich has been protected using the Permutation identified byPermutationId. ProductContextFor()is used in any IAgentContext for the currentPermutationId.
ProductContextFor(String, String)
Provides access to information regarding installed licenses and Activation capabilities relating to the Licenses and Features for the Software Potential service Product profile designated by the productName and productVersion parameters.
Declaration
IProductContext ProductContextFor(string productName, string productVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | productName | The Product Name string, e.g., |
| System.String | productVersion | The Product Version string, e.g., |
Returns
| Type | Description |
|---|---|
| IProductContext |