Gets a license for the instance of the component and determines if it is valid.
[Visual Basic] Overrides Public Function GetLicense( _ ByVal context As LicenseContext, _ ByVal type As Type, _ ByVal instance As Object, _ ByVal allowExceptions As Boolean _ ) As License [C#] public override License GetLicense( LicenseContext context, Type type, object instance, bool allowExceptions ); [C++] public: override License* GetLicense( LicenseContext* context, Type* type, Object* instance, bool allowExceptions ); [JScript] public override function GetLicense( context : LicenseContext, type : Type, instance : Object, allowExceptions : Boolean ) : License;
A valid License. If this method cannot find a valid License or a valid context, it returns a null reference (in Visual Basic Nothing).
At design time, the GetLicense method looks for a license file named "className.LIC" where className is the FullName of the component you want to create. This file must be in the same directory as the DLL with the class.
Then this method checks the first line of the license file against a key specified in the IsKeyValid method. If the key is valid, this line is used as the LicenseKey.
LicFileLicenseProvider Class | LicFileLicenseProvider Members | System.ComponentModel Namespace | License | LicenseContext | LicenseException | LicenseManager | LicenseProvider | LicenseProviderAttribute | LicFileLicenseProvider | LicenseUsageMode