LicenseContext.GetSavedLicenseKey 方法

当在派生类中被重写时,从指定的资源程序集中为指定类型返回已保存的许可证密钥。

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

语法

声明
Public Overridable Function GetSavedLicenseKey ( _
    type As Type, _
    resourceAssembly As Assembly _
) As String
用法
Dim instance As LicenseContext
Dim type As Type
Dim resourceAssembly As Assembly
Dim returnValue As String

returnValue = instance.GetSavedLicenseKey(type, resourceAssembly)
public virtual string GetSavedLicenseKey (
    Type type,
    Assembly resourceAssembly
)
public:
virtual String^ GetSavedLicenseKey (
    Type^ type, 
    Assembly^ resourceAssembly
)
public String GetSavedLicenseKey (
    Type type, 
    Assembly resourceAssembly
)
public function GetSavedLicenseKey (
    type : Type, 
    resourceAssembly : Assembly
) : String

参数

  • type
    表示组件类型的 Type
  • resourceAssembly
    带有许可证密钥的 Assembly

返回值

指定类型的 LicenseKey。该方法返回 空引用(在 Visual Basic 中为 Nothing),除非您将其重写。

备注

给继承者的说明 重写该方法和 SetSavedLicenseKey 方法来实现已保存的许可证密钥。如果 resourceAssembly 参数为 空引用(在 Visual Basic 中为 Nothing),则您可以在主执行 Assembly 中检索资源。

平台

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