IConfigurationSection 介面

定義

表示應用程式組態值的區段。

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

屬性

Item[String]

取得或設定組態值。

(繼承來源 IConfiguration)
Key

取得這個區段在其父代中佔用的索引鍵。

Path

取得 IConfiguration中這個區段的完整路徑。

Value

取得或設定區段值。

方法

GetChildren()

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

(繼承來源 IConfiguration)
GetReloadToken()

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

(繼承來源 IConfiguration)
GetSection(String)

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

(繼承來源 IConfiguration)

擴充方法

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內的機碼/值組列舉。

Exists(IConfigurationSection)

判斷區段是否有 Value 或具有子系。

GetConnectionString(IConfiguration, String)

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

GetRequiredSection(IConfiguration, String)

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

適用於