DeployLX Software Protection System

Script Limit

The Script Limit serves as a lite custom limit.

Note The script limit cannot be used with the embeddable source code us a custom limit instead.

How is the Script Limit Enforced?

When the license is validated DeployLX executes the validation scripts defined by the limit.

The Validate and Granted Scripts

The Validate and Granted scripts will be executed when the Validate and Granted methods are called respectively and must return one of the ValidationResult values.

As an Embedded Script

The scripts can contain any valid C# or Visual Basic .NET code to perform any custom validation logic and have access to the following global objects.


Reference to the SecureLicenseContext of the current validation request.

Limit Reference to the Script Limit itself.
License Reference to the license being validated.
If Environment.MachineName <> Limit.Properties("MachineName") Then _
    Return Context.ReportError( "Invalid machine.", ScriptLimit )

Return ValidationResult.Valid
if( Environment.MachineName != Limit.Properties[ "MachineName" ] )
    return Context.ReportError( "Invalid machine.", ScriptLimit );

return ValidationResult.Valid;

As An External Reference

Instead of containing code directly the scripts can instead call a static method on another object. To call the static method the script must contain only the following code indicating which method to call.


The signature of the method must be

Public Shared Function Validate(
    ByVal context As SecureLicenseContext, 
    ByVal limit As ScriptLimit, 
    ByVal license As SecureLicense) As ValidationResult
public static ValidationResult Validate( 
    SecureLicenseContext context, 
    ScriptLimit limit, 
    SecureLicense license )

Properties Collection

The properties collection can be used to store variables to be edited in the DeployLX Manager. These variables can then be used by the custom logic by accessing the Limit.Properties collection.

See Also