ConfigurationRoot 類別

定義

組態的根節點。

public ref class ConfigurationRoot : Microsoft::Extensions::Configuration::IConfigurationRoot
public ref class ConfigurationRoot : IDisposable, Microsoft::Extensions::Configuration::IConfigurationRoot
public class ConfigurationRoot : Microsoft.Extensions.Configuration.IConfigurationRoot
public class ConfigurationRoot : IDisposable, Microsoft.Extensions.Configuration.IConfigurationRoot
type ConfigurationRoot = class
    interface IConfigurationRoot
    interface IConfiguration
type ConfigurationRoot = class
    interface IConfigurationRoot
    interface IConfiguration
    interface IDisposable
type ConfigurationRoot = class
    interface IConfiguration
    interface IConfigurationRoot
    interface IDisposable
Public Class ConfigurationRoot
Implements IConfigurationRoot
Public Class ConfigurationRoot
Implements IConfigurationRoot, IDisposable
繼承
ConfigurationRoot
實作

建構函式

ConfigurationRoot(IList<IConfigurationProvider>)

以提供者清單初始化組態根。

屬性

Item[String]

取得或設定對應於組態索引鍵的值。

Providers

此組態的 IConfigurationProvider

方法

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetChildren()

取得直接子系子區段。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetReloadToken()

傳回可用於在重新載入此組態時觀察的 IChangeToken

GetSection(String)

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

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
Reload()

強制從基礎來源重新載入組態值。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

擴充方法

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>)

會產生人類看得懂的組態檢視,顯示每個值的來源。

適用於