Agile.NET LicenseProvider implementation.
System.Object
   LicenseProvider
      AgileDotNetLicenseProvider
Namespace: AgileDotNet.Licensing
Assembly: AgileDotNet.Licensing (in AgileDotNet.Licensing.dll)
Agile.NET complies with the .NET Framework licensing model implementation and thus provides an implementation for LicenseProvider class. The license is obtained by calling the framework's LicenseManager.Validate method, which initializes an instance of AgileDotNetLicenseProvider type and calls the GetLicense method.
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; } }
AgileDotNetLicenseProvider Members | AgileDotNet.Licensing Namespace | AgileDotNetLicense