LicFileLicenseProvider.IsKeyValid Method (String, Type)


Determines whether the key that the GetLicense method retrieves is valid for the specified type.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

protected virtual bool IsKeyValid(
	string key,
	Type type


Type: System.String

The LicenseKey to check.

Type: System.Type

A Type that represents the component requesting the License.

Return Value

Type: System.Boolean

true if the key is a valid LicenseKey for the specified type; otherwise, false.

This method checks the key against the phrase: " myClassName is a licensed component. ", where myClassName is the FullName of the component you want to create.

Notes to Inheritors:

When you inherit from this class, you can override this method to provide your own validation logic.

.NET Framework
Available since 1.1
Return to top