LicenseContext 类
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定何时可使用授权的对象,并且提供一种方法,用以获取为支持在其域内运行的许可证所需要的附加服务。
public ref class LicenseContext : IServiceProvider
public class LicenseContext : IServiceProvider
type LicenseContext = class
interface IServiceProvider
Public Class LicenseContext
Implements IServiceProvider
- 继承
-
LicenseContext
- 派生
- 实现
此类提供默认 LicenseContext的 。 它仅实现运行时支持,不支持保存的许可证密钥。
如果要实现设计时许可证支持,则必须从此类继承,并重写以下成员: UsageMode、 GetSavedLicenseKey(Type, Assembly)、 GetService(Type)和 SetSavedLicenseKey(Type, String)。 如果要实现保存的许可证密钥,请重写 GetSavedLicenseKey(Type, Assembly) 和 SetSavedLicenseKey(Type, String) 方法。
有关许可的详细信息,请参阅 如何:许可组件和控件。
License |
初始化 LicenseContext 类的新实例。 |
Usage |
当在派生类中被重写时,获取一个指定何时可使用许可证的值。 |
Equals(Object) |
确定指定对象是否等于当前对象。 (继承自 Object) |
Get |
作为默认哈希函数。 (继承自 Object) |
Get |
当在派生类中被重写时,从指定的资源程序集中为指定类型返回已保存的许可证密钥。 |
Get |
获取请求的服务(如果该服务可用的话)。 |
Get |
获取当前实例的 Type。 (继承自 Object) |
Memberwise |
创建当前 Object 的浅表副本。 (继承自 Object) |
Set |
当在派生类中被重写时,为指定的类型设置许可证密钥。 |
To |
返回表示当前对象的字符串。 (继承自 Object) |
产品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |