SecureTeam Copy Protection

AgileDotNetLicenseProvider

Agile.NET LicenseProvider implementation.

Inheritance Hierarchy

System.Object
   LicenseProvider
      AgileDotNetLicenseProvider

Namespace: AgileDotNet.Licensing
Assembly: AgileDotNet.Licensing (in AgileDotNet.Licensing.dll)

Syntax

Public Class AgileDotNetLicenseProvider
    Inherits LicenseProvider
public class AgileDotNetLicenseProvider : LicenseProvider

Remarks

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.

Example

 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;
 
     }
 }
 

See Also

AgileDotNetLicenseProvider Members | AgileDotNet.Licensing Namespace | AgileDotNetLicense