ConfigurationBinder.Bind 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Bind(IConfiguration, Object) |
尝试通过按递归方式根据配置键匹配属性名称,将给定的对象实例绑定到配置值。 |
Bind(IConfiguration, Object, Action<BinderOptions>) |
尝试通过按递归方式根据配置键匹配属性名称,将给定的对象实例绑定到配置值。 |
Bind(IConfiguration, String, Object) |
尝试通过按递归方式根据配置键匹配属性名称,将给定的对象实例绑定到该键指定的配置节。 |
Bind(IConfiguration, Object)
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
尝试通过按递归方式根据配置键匹配属性名称,将给定的对象实例绑定到配置值。
public:
[System::Runtime::CompilerServices::Extension]
static void Bind(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::Object ^ instance);
public static void Bind (this Microsoft.Extensions.Configuration.IConfiguration configuration, object? instance);
static member Bind : Microsoft.Extensions.Configuration.IConfiguration * obj -> unit
<Extension()>
Public Sub Bind (configuration As IConfiguration, instance As Object)
参数
- configuration
- IConfiguration
要绑定的配置实例。
- instance
- Object
要绑定的对象。
适用于
Bind(IConfiguration, Object, Action<BinderOptions>)
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
尝试通过按递归方式根据配置键匹配属性名称,将给定的对象实例绑定到配置值。
public:
[System::Runtime::CompilerServices::Extension]
static void Bind(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::Object ^ instance, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureOptions);
public static void Bind (this Microsoft.Extensions.Configuration.IConfiguration configuration, object? instance, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureOptions);
static member Bind : Microsoft.Extensions.Configuration.IConfiguration * obj * Action<Microsoft.Extensions.Configuration.BinderOptions> -> unit
<Extension()>
Public Sub Bind (configuration As IConfiguration, instance As Object, configureOptions As Action(Of BinderOptions))
参数
- configuration
- IConfiguration
要绑定的配置实例。
- instance
- Object
要绑定的对象。
- configureOptions
- Action<BinderOptions>
配置绑定器选项。
适用于
Bind(IConfiguration, String, Object)
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
- Source:
- ConfigurationBinder.cs
尝试通过按递归方式根据配置键匹配属性名称,将给定的对象实例绑定到该键指定的配置节。
public:
[System::Runtime::CompilerServices::Extension]
static void Bind(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::String ^ key, System::Object ^ instance);
public static void Bind (this Microsoft.Extensions.Configuration.IConfiguration configuration, string key, object? instance);
static member Bind : Microsoft.Extensions.Configuration.IConfiguration * string * obj -> unit
<Extension()>
Public Sub Bind (configuration As IConfiguration, key As String, instance As Object)
参数
- configuration
- IConfiguration
要绑定的配置实例。
- key
- String
要绑定的配置节的键。
- instance
- Object
要绑定的对象。