BindingContext 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
基于命令行分析器结果、注入的服务和其他值源创建对象实例。
public ref class BindingContext sealed : IServiceProvider
public ref class BindingContext sealed
public sealed class BindingContext : IServiceProvider
public sealed class BindingContext
type BindingContext = class
interface IServiceProvider
type BindingContext = class
Public NotInheritable Class BindingContext
Implements IServiceProvider
Public NotInheritable Class BindingContext
- 继承
-
BindingContext
- 实现
构造函数
| 名称 | 说明 |
|---|---|
| BindingContext(ParseResult, IConsole) |
基于命令行分析器结果、注入的服务和其他值源创建对象实例。 |
属性
| 名称 | 说明 |
|---|---|
| Console |
基于命令行分析器结果、注入的服务和其他值源创建对象实例。 |
| ParseResult |
当前调用的分析结果。 |
方法
| 名称 | 说明 |
|---|---|
| AddService(Type, Func<IServiceProvider,Object>) |
将指定的服务工厂添加到绑定上下文。 |
| AddService(Type, Func<Object>) |
基于命令行分析器结果、注入的服务和其他值源创建对象实例。 |
| AddService<T>(Func<IServiceProvider,T>) |
将指定的服务工厂添加到绑定上下文。 |
| GetService(Type) |
获取指定类型的服务对象。 |