LicFileLicenseProvider.IsKeyValid 方法

确定 GetLicense 方法检索的密钥对指定的类型是否有效。

**命名空间:**System.ComponentModel
**程序集:**System(在 system.dll 中)

语法

声明
Protected Overridable Function IsKeyValid ( _
    key As String, _
    type As Type _
) As Boolean
用法
Dim key As String
Dim type As Type
Dim returnValue As Boolean

returnValue = Me.IsKeyValid(key, type)
protected virtual bool IsKeyValid (
    string key,
    Type type
)
protected:
virtual bool IsKeyValid (
    String^ key, 
    Type^ type
)
protected boolean IsKeyValid (
    String key, 
    Type type
)
protected function IsKeyValid (
    key : String, 
    type : Type
) : boolean

参数

返回值

如果该密钥是指定类型的有效 LicenseKey,则为 true;否则为 false

备注

此方法依据短语“myClassName is a licensed component.”检查密钥,其中 myClassName 是要创建的组件的 FullName

给继承者的说明 当从此类继承时,可以重写此方法以提供您自己的验证逻辑。

平台

Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

LicFileLicenseProvider 类
LicFileLicenseProvider 成员
System.ComponentModel 命名空间
License 类
LicenseContext 类
LicenseException 类
LicenseManager 类
LicenseProvider 类
LicenseProviderAttribute 类
LicFileLicenseProvider 类
LicenseUsageMode 枚举