LicenseContext 类

定义

指定何时可使用授权的对象,并且提供一种方法,用以获取为支持在其域内运行的许可证所需要的附加服务。

public ref class LicenseContext : IServiceProvider
public class LicenseContext : IServiceProvider
type LicenseContext = class
    interface IServiceProvider
Public Class LicenseContext
Implements IServiceProvider
继承
LicenseContext
派生
实现

注解

此类提供默认 LicenseContext的 。 它仅实现运行时支持,不支持保存的许可证密钥。

继承者说明

如果要实现设计时许可证支持,则必须从此类继承,并重写以下成员: UsageModeGetSavedLicenseKey(Type, Assembly)GetService(Type)SetSavedLicenseKey(Type, String)。 如果要实现保存的许可证密钥,请重写 GetSavedLicenseKey(Type, Assembly)SetSavedLicenseKey(Type, String) 方法。

有关许可的详细信息,请参阅 如何:许可组件和控件

构造函数

LicenseContext()

初始化 LicenseContext 类的新实例。

属性

UsageMode

当在派生类中被重写时,获取一个指定何时可使用许可证的值。

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetSavedLicenseKey(Type, Assembly)

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

GetService(Type)

获取请求的服务(如果该服务可用的话)。

GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
SetSavedLicenseKey(Type, String)

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

ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅