• Webservices API
  • Agent Runtime API
  • Support
  • Samples
  • Software Potential Home
Show / Hide Table of Contents
  • Sp.Agent
    • ActivateLicensesExtensions
    • IProductContext
    • ProductActivationConfigurationCompleteWithDefaultsExtensions
    • ProductActivationConfigurationDefaultExtensions
  • Sp.Agent.Activation
    • ActivationServerException
    • ActivationTransmissionException
    • DeviceChangedActivationServerException
    • DistributorLicenseActivationServerException
    • IActivateLicenses
    • IActivateLicensesAdvanced
    • InvalidLicenseKeyException
    • InvalidVersionActivationServerException
    • LicenseDisabledActivationServerException
    • LicenseExpiredActivationServerException
    • LinkedLicenseAmbiguousStorageActivationServerException
    • LinkedLicenseNoStorageActivationServerException
    • NumberOfActivationsExceededActivationServerException
    • ProductIdMismatchActivationServerException
    • RenewalNotAuthorizedActivationServerException
    • TagsChangedActivationServerException
  • Sp.Agent.Configuration
    • AgentContext
    • AgentContextDistributorsExtensions
    • AgentDistributorsConfigurationExtensions
    • CloudStorageConfigurationExtensions
    • ConfigurationCompleteWithDefaultsExtensions
    • CrmActivationEndpointsConfigurationPhaseExtensions
    • CrmAgentContextExtensions
    • CrmStartingConfigurationPhaseExtensions
    • DistributorDisableStorageExtensions
    • FileStoreInitialization
    • HardwareStoreConfigurationExtensions
    • HardwareStoreInitialization
    • IAgentChallengeConfigurationPhase
    • IAgentCloudStorageCommenceConfigurationPhase
    • IAgentCloudStorageCompleteConfigurationPhase
    • IAgentCloudStorageConfigurationPhase
    • IAgentCloudStorageConfigurationPhaseTail
    • IAgentCloudStorageCustomIdConfigurationPhase
    • IAgentCommenceConfigurationPhase
    • IAgentCompletedConfigurationPhase
    • IAgentContext
    • IAgentDistributorsConfigurationPhase
    • IAgentEmbeddedLicensesConfigurationPhase
    • IAgentExternalStorageConfigurationPhase
    • IAgentHardwareBoundStorageConfigurationPhase
    • IAgentUserBoundStorageConfigurationPhase
    • ICrmActivationEndpointsConfigurationPhase
    • IDistributorCommenceConfigurationPhase
    • IDistributorCompletedConfigurationPhase
    • IDistributorConfigurationPhaseTail
    • IDistributorNamedUserConfigurationPhase
    • IInitializeStores
    • IStoreLicensesInitializationExtensions
    • LocalStoreConfigurationExtensions
    • LocalStoreInitialization
    • ProductContextDistributedExtensions
    • RemovableConfigurationExtensions
    • WebApplicationStoreConfigurationExtensions
  • Sp.Agent.Configuration.Product
    • IProductCommenceConfigurationPhase
    • IProductCompletedConfigurationPhase
    • IProductConfigurationPhaseTail
  • Sp.Agent.Configuration.Product.Activation
    • IActivationAttemptContext
    • IActivationDeviceLabelContext
    • IActivationTaggingContext
    • IProductActivationCommenceConfigurationPhase
    • IProductActivationCompletedConfigurationPhase
    • IProductActivationConfigurationPhase
    • IProductActivationConfigurationPhaseTail
    • IProductActivationDeviceLabelConfigurationPhase
    • IProductActivationDeviceLabelTailConfigurationPhase
    • IProductActivationTransmissionCommenceConfigurationPhase
    • IProductActivationTransmissionCompletedConfigurationPhase
    • IProductActivationTransmissionConfigurationPhase
    • IProductActivationTransmissionConfigurationPhaseTail
    • IProductActivationTransmissionEndpointConfigurationPhase
    • IProductActivationTransmissionHooksConfigurationPhase
    • IProductActivationTransmissionProxyConfigurationPhase
    • ProductActivationConfigurationException
  • Sp.Agent.Distributor
    • CheckedOutNotLicensedException
    • CheckoutRequiresStorageException
    • CheckoutStorageAccessException
    • DistributorIntegrityException
    • DistributorIntegrityNotLicensedException
    • DistributorNotLicensedException
    • DistributorRequestException
    • IAvailableCheckout
    • ICheckout
    • ICheckoutContext
    • IDistributedContext
    • IDistributorsContext
    • NoDistributorException
    • NoLongerAvailableException
    • NotLicnesedInvalidNamedUserException
  • Sp.Agent.Execution
    • NotLicensedException
  • Sp.Agent.Licensing
    • IFeature
    • ILicense
    • ILicenseAdvanced
    • ILicensePeriod
    • ILicenseRenewal
    • IQueryFeatures
    • IQueryLicenses
    • IQueryLocalFeatures
    • IQueryUserTokens
    • IUserToken
    • LicenseRevisionException
  • Sp.Agent.Storage
    • DistributorLicenseOnClientException
    • InvalidStorageAccessException
    • InvalidStorageException
    • IStore
    • IStoreLicenses
    • IStoreUserTokens
    • LicenseNotFoundException
    • LicenseTargetEnvironmentMismatchException
    • NonmatchingProductIdException
    • ReadingStorageInaccessibleException
    • ServerOSNotAllowedException
    • StorageInaccessibleException
    • StoreNotEmptyException
    • UserTokenNotFoundException
    • VirtualMachineNotAllowedException
    • WritingStorageInaccessibleException

Class AgentContext

Main entry point to the Software Potential Agent's Configuration and processing capabilities.

  • Configuration - Controls configuration of the Agent's Stores, Activation endpoints etc. in a manner appropriate to your application style/environment.
  • Agent Context, see IAgentContext - Provides licensing and configuration information not pertaining to a specific licensed product.
  • Product Context, see IProductContext - Provides information regarding a licensed product.

Namespace: Sp.Agent.Configuration
Assembly: Sp.Agent.dll
Examples
using Sp.Agent.Configuration;
using Sp.Agent;

// Skeleton Software Potential Agent Integration class - see documentation for your application environment/style to see Configuration options.
public class SpAgent
{
   readonly static IAgentContext _agentContext;
   readonly static IProductContext _product;

   static SpAgent()
   {
       _agentContext = AgentContext.For( "abc12" );
       // TODO see your specific Sp.Agent.*.dll Integration Layer Documentation for specifics of how to manage configuration for your application/hosting context
       // _agentContext.Configure( x => x /* application/environment-specific Configuration Sequence */ .CompleteWithDefaults() );
       _product = _agentContext.ProductContextFor( "My Product", "My Version" );
       // _product.Configure( x => x /* product-specific Configuration Sequence */ .CompleteWithDefaults() );
   }

   static IProductContext Product
   {
       get { return _product; }
   }

   public void Activate( string activationKey )
   {
       Product.Activation.OnlineActivate( activationKey );
   }
}

Methods

For(String)

Obtains the IAgentContext for the Software Potential Agent Permutation with reference id permutationId.

Declaration
public static IAgentContext For(string permutationId)
Parameters
Type Name Description
System.String permutationId
Returns
Type Description
IAgentContext

IAgentContext for the specified Software Potential Agent Permutation.

Examples
AgentContext.For( "abc12" )
Exceptions
Type Condition
System.ArgumentNullException

Thrown if permutationId is null.

For(String, Assembly)

Obtains the IAgentContext for the Software Potential Agent Permutation with reference id permutationId.

This overload uses the location of the associatedAssembly, if non-null, as an additional search location for permuted Agent DLLs (e.g., Sp.Agent.abc12.dll)

Declaration
public static IAgentContext For(string permutationId, Assembly associatedAssembly)
Parameters
Type Name Description
System.String permutationId
System.Reflection.Assembly associatedAssembly
Returns
Type Description
IAgentContext

IAgentContext for the specified Software Potential Agent Permutation.

Examples
AgentContext.For("abc12", typeof(SpAgent).Assembly)
Exceptions
Type Condition
System.ArgumentNullException

Thrown if permutationId is null.

Back to top Generated by DocFX