IConfigurationRoot 介面

定義

表示 IConfiguration 階層的根目錄。

public interface class IConfigurationRoot : Microsoft::Extensions::Configuration::IConfiguration
public interface IConfigurationRoot : Microsoft.Extensions.Configuration.IConfiguration
type IConfigurationRoot = interface
    interface IConfiguration
Public Interface IConfigurationRoot
Implements IConfiguration
衍生
實作

屬性

Item[String]

取得或設定組態值。

(繼承來源 IConfiguration)
Providers

此組態的 IConfigurationProvider

方法

GetChildren()

取得直接子系組態子區段。

(繼承來源 IConfiguration)
GetReloadToken()

傳回 IChangeToken,這個 IChangeToken 可用來觀察此設定重載時。

(繼承來源 IConfiguration)
GetSection(String)

取得具有指定索引鍵的組態子區段。

(繼承來源 IConfiguration)
Reload()

強制從基礎 IConfigurationProvider重載組態值。

擴充方法

Bind(IConfiguration, Object)

嘗試將指定的物件實例系結至組態值,方法是以遞歸方式比對組態索引鍵的屬性名稱。

Bind(IConfiguration, Object, Action<BinderOptions>)

嘗試將指定的物件實例系結至組態值,方法是以遞歸方式比對組態索引鍵的屬性名稱。

Bind(IConfiguration, String, Object)

嘗試將指定的物件實例系結至索引鍵所指定的組態區段,方法是以遞歸方式比對組態索引鍵的屬性名稱。

Get(IConfiguration, Type)

嘗試將組態實例系結至 T 類型的新實例。如果此組態區段具有值,將會使用該值。 否則,請以遞歸方式將屬性名稱與組態索引鍵比對。

Get(IConfiguration, Type, Action<BinderOptions>)

嘗試將組態實例系結至 T 類型的新實例。如果此組態區段具有值,將會使用該值。 否則,請以遞歸方式將屬性名稱與組態索引鍵比對。

Get<T>(IConfiguration)

嘗試將組態實例系結至 T 類型的新實例。如果此組態區段具有值,將會使用該值。 否則,請以遞歸方式將屬性名稱與組態索引鍵比對。

Get<T>(IConfiguration, Action<BinderOptions>)

嘗試將組態實例系結至 T 類型的新實例。如果此組態區段具有值,將會使用該值。 否則,請以遞歸方式將屬性名稱與組態索引鍵比對。

GetValue(IConfiguration, Type, String)

使用指定的索引鍵擷取值,並將它轉換成指定的型別。

GetValue(IConfiguration, Type, String, Object)

使用指定的索引鍵擷取值,並將它轉換成指定的型別。

GetValue<T>(IConfiguration, String)

使用指定的索引鍵擷取值,並將它轉換成 T 類型。

GetValue<T>(IConfiguration, String, T)

使用指定的索引鍵擷取值,並將它轉換成 T 類型。

AsEnumerable(IConfiguration)

取得 IConfiguration內的機碼/值組列舉。

AsEnumerable(IConfiguration, Boolean)

取得 IConfiguration內的機碼/值組列舉。

GetConnectionString(IConfiguration, String)

從組態來源的 ConnectionStrings 區段擷取具有指定索引鍵的值。 呼叫此方法是 GetSection("ConnectionStrings")[name]的速記。

GetRequiredSection(IConfiguration, String)

取得具有指定索引鍵的組態子區段。

GetDebugView(IConfigurationRoot)

產生組態的人類可讀取檢視,其中顯示每個值的來源。

GetDebugView(IConfigurationRoot, Func<ConfigurationDebugViewContext,String>)

產生組態的人類可讀取檢視,其中顯示每個值的來源。

適用於