CAS.Lib.CodeProtect Namespace
CAS.Lib.CodeProtect.LicenseDsc Namespace
CAS.Lib.CodeProtect.LicenseDsc.Constraints Namespace
CAS.Lib.CodeProtect.Properties Namespace
OOI CodeProtect

DemoConstraint..::..Validate Method

This verifies the license meets its desired validation criteria. This includes the following if defined: Verify the license is after the start dateVerify the license is before the end dataThe maximum number of days has not been exceeded If any of these is exceeded then the license failure reason is set to the reason for the failure and this function returns false. Otherwise the license is valid and the method returns true.

Namespace:  CAS.Lib.CodeProtect.LicenseDsc.Constraints
Assembly:  CAS.CodeProtect (in CAS.CodeProtect.dll)

Syntax


public bool Validate(
	Type typeToValidate,
	ref int vc,
	ref int rtc
)
Public Function Validate ( _
	typeToValidate As Type, _
	ByRef vc As Integer, _
	ByRef rtc As Integer _
) As Boolean
public:
bool^ Validate(
	Type^ typeToValidate, 
	int^% vc, 
	int^% rtc
)

Parameters

typeToValidate
Type: Type
Type to validate
vc
Type: Int32%
Volume constraint - max number of items. -1 no constrain.
rtc
Type: Int32%
Runtime in hours. –1 means no limits.

Return Value

True if the license meets the validation criteria. Otherwise False.

Remarks


When a failure occurs the FailureReason will be set to the details of the failure. If the Conditions, Purchase URL, or the Information URL is defined then they will also be added to the failure reason.