SecureTeam Copy Protection

TrialLock

Designates that the license is an evaluation license.

Inheritance Hierarchy

System.Object
   AgileDotNetObject
      Lock
         TrialLock

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

Syntax

Public Class TrialLock
    Inherits Lock
public class TrialLock : Lock

Remarks

You can add a TrialLock to the license Locks collection and thus designate it as a trial license. You can later query the IsTrial property to find out if the license contains a TrialLock and act accordingly.

The TrialLock may be used to create an evaluation license. To create a 30-day evaluation license you will have to add a TrialLock and a TimeLock instance to the license Locks collection.

Example

public class LicenseFactory
{
    public static AgileDotNetLicense CreateTrialLicense()
    {
        AgileDotNetLicense license = new AgileDotNetLicense();
        TrialLock trialLock = new TrialLock();
        TimeLock timeLock = new TimeLock(30);
        license.Locks.Add(trialLock);
        license.Locks.Add(timeLock);
        license.Save("MyLic");
        return license;
    }
}
 

See Also

TrialLock Members | AgileDotNet.Licensing Namespace | AgileDotNetLicense.Locks | TimeLock