Represents a license containning all required information to authorize the use of a component or an application.
System.Object
   License
      AgileDotNetLicense
Namespace: AgileDotNet.Licensing
Assembly: AgileDotNet.Licensing (in AgileDotNet.Licensing.dll)
As Agile.NET's licensing model complies with the .NET Framework licensing model implementation you can retrieve a license through the use of validation, this is done by calling LicenseManager.Validate.
To ensure that the license isn't modified after it was issued the license gets signed with an asymmetric encryption algorithm. The public key is stored with Agile.NET runtime component while the private key remains with original developers thus they are the only authority that can grant valid license files.
using System; using System.ComponentModel; using AgileDotNet.Licensing; namespace SecuredNamespace { [LicenseProvider(typeof(AgileDotNetLicenseProvider))] public class SecuredComponent { public SecuredComponent() { license = LicenseManager.Validate(this.GetType(), this) as AgileDotNetLicense; } public void ExecuteProtecteMethod() { if (license.IsTrial) { // Add your code here } else { // Add your code here } } private AgileDotNetLicense license; } }
AgileDotNetLicense Members | AgileDotNet.Licensing Namespace | Locks