ConfigurationBinder.Bind 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Bind(IConfiguration, Object) |
嘗試將屬性名稱與組態索引鍵以遞迴方式比對,以將指定的物件執行個體繫結至組態值。 |
Bind(IConfiguration, Object, Action<BinderOptions>) |
嘗試將屬性名稱與組態索引鍵以遞迴方式比對,以將指定的物件執行個體繫結至組態值。 |
Bind(IConfiguration, String, Object) |
嘗試將屬性名稱與組態索引鍵以遞迴方式比對,以將指定物件執行個體繫結至由索引鍵指定的組態區段。 |
Bind(IConfiguration, Object)
嘗試將屬性名稱與組態索引鍵以遞迴方式比對,以將指定的物件執行個體繫結至組態值。
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>)
嘗試將屬性名稱與組態索引鍵以遞迴方式比對,以將指定的物件執行個體繫結至組態值。
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)
嘗試將屬性名稱與組態索引鍵以遞迴方式比對,以將指定物件執行個體繫結至由索引鍵指定的組態區段。
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
要繫結的物件。