LicenseContext.SetSavedLicenseKey 方法

当在派生类中被重写时,为指定的类型设置许可证密钥。

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

语法

声明
Public Overridable Sub SetSavedLicenseKey ( _
    type As Type, _
    key As String _
)
用法
Dim instance As LicenseContext
Dim type As Type
Dim key As String

instance.SetSavedLicenseKey(type, key)
public virtual void SetSavedLicenseKey (
    Type type,
    string key
)
public:
virtual void SetSavedLicenseKey (
    Type^ type, 
    String^ key
)
public void SetSavedLicenseKey (
    Type type, 
    String key
)
public function SetSavedLicenseKey (
    type : Type, 
    key : String
)

参数

  • type
    一个 Type,表示与该许可证密钥相关联的组件。

备注

通常应在设计时设置 LicenseUsageMode 时调用此方法。您必须重写 UsageMode 属性来实现设计时许可证支持。

给继承者的说明 该方法不为已保存的许可证密钥提供支持。重写该方法和 GetSavedLicenseKey 方法来实现密钥。

平台

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

请参见

参考

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