NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

LicFileLicenseProvider.IsKeyValid

Determines if the key retrieved by the GetLicense method is valid for the specified type.

[Visual Basic]
Overridable Protected Function IsKeyValid( _
   ByVal key As String, _
   ByVal type As Type _
) As Boolean
[C#]
protected virtual bool IsKeyValid(
   string key,
   Type type
);
[C++]
protected: virtual bool IsKeyValid(
   String* key,
   Type* type
);
[JScript]
protected function IsKeyValid(
   key : String,
   type : Type
) : Boolean;

Parameters

key
The LicenseKey to check.
type
A Type that represents the component that is requesting the License.

Return Value

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

Remarks

This method checks the key against the phrase: "className is a licensed component." where className 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.

See Also

LicFileLicenseProvider Class | LicFileLicenseProvider Members | System.ComponentModel Namespace | License | LicenseContext | LicenseException | LicenseManager | LicenseProvider | LicenseProviderAttribute | LicFileLicenseProvider | LicenseUsageMode