LicenseProvider.GetLicense Method (LicenseContext, Type, Object, Boolean)

 

When overridden in a derived class, gets a license for an instance or type of component, when given a context and whether the denial of a license throws an exception.

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

public abstract License GetLicense(
	LicenseContext context,
	Type type,
	object instance,
	bool allowExceptions
)

Parameters

context
Type: System.ComponentModel.LicenseContext

A LicenseContext that specifies where you can use the licensed object.

type
Type: System.Type

A Type that represents the component requesting the license.

instance
Type: System.Object

An object that is requesting the license.

allowExceptions
Type: System.Boolean

true if a LicenseException should be thrown when the component cannot be granted a license; otherwise, false.

Return Value

Type: System.ComponentModel.License

A valid License.

Notes to Inheritors:

When you inherit from LicenseProvider, you must override GetLicense to implement a validation method for the license key.

.NET Framework
Available since 1.1
Return to top
Show: