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

Definition

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.

public:
 abstract System::ComponentModel::License ^ GetLicense(System::ComponentModel::LicenseContext ^ context, Type ^ type, System::Object ^ instance, bool allowExceptions);
public abstract System.ComponentModel.License GetLicense (System.ComponentModel.LicenseContext context, Type type, object instance, bool allowExceptions);
abstract member GetLicense : System.ComponentModel.LicenseContext * Type * obj * bool -> System.ComponentModel.License

Parameters

context
LicenseContext LicenseContext LicenseContext

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

type
Type Type Type

A Type that represents the component requesting the license.

instance
Object Object Object

An object that is requesting the license.

allowExceptions
Boolean Boolean Boolean

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

Returns

Notes to Inheritors

When you inherit from LicenseProvider, you must override GetLicense(LicenseContext, Type, Object, Boolean) to implement a validation method for the license key.

Applies to

See also