共用方式為


KeyPerFileConfigurationBuilderExtensions.AddKeyPerFile 方法

定義

多載

AddKeyPerFile(IConfigurationBuilder, Action<KeyPerFileConfigurationSource>)

使用目錄中的檔案新增組態。 檔案名稱會用作索引建,檔案內容會用作值。

AddKeyPerFile(IConfigurationBuilder, String)

使用目錄中的檔案新增組態。 檔案名稱會用作索引建,檔案內容會用作值。

AddKeyPerFile(IConfigurationBuilder, String, Boolean)

使用目錄中的檔案新增組態。 檔案名稱會用作索引建,檔案內容會用作值。

AddKeyPerFile(IConfigurationBuilder, String, Boolean, Boolean)

使用目錄中的檔案新增組態。 檔案名稱會用作索引建,檔案內容會用作值。

AddKeyPerFile(IConfigurationBuilder, Action<KeyPerFileConfigurationSource>)

來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs

使用目錄中的檔案新增組態。 檔案名稱會用作索引建,檔案內容會用作值。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddKeyPerFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, Action<Microsoft::Extensions::Configuration::KeyPerFile::KeyPerFileConfigurationSource ^> ^ configureSource);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Action<Microsoft.Extensions.Configuration.KeyPerFile.KeyPerFileConfigurationSource> configureSource);
static member AddKeyPerFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * Action<Microsoft.Extensions.Configuration.KeyPerFile.KeyPerFileConfigurationSource> -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddKeyPerFile (builder As IConfigurationBuilder, configureSource As Action(Of KeyPerFileConfigurationSource)) As IConfigurationBuilder

參數

builder
IConfigurationBuilder

要新增的目標 IConfigurationBuilder

configureSource
Action<KeyPerFileConfigurationSource>

設定來源。

傳回

IConfigurationBuilder

適用於

AddKeyPerFile(IConfigurationBuilder, String)

來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs

使用目錄中的檔案新增組態。 檔案名稱會用作索引建,檔案內容會用作值。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddKeyPerFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, System::String ^ directoryPath);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string directoryPath);
static member AddKeyPerFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * string -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddKeyPerFile (builder As IConfigurationBuilder, directoryPath As String) As IConfigurationBuilder

參數

builder
IConfigurationBuilder

要新增的目標 IConfigurationBuilder

directoryPath
String

目錄的路徑。

傳回

IConfigurationBuilder

適用於

AddKeyPerFile(IConfigurationBuilder, String, Boolean)

來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs

使用目錄中的檔案新增組態。 檔案名稱會用作索引建,檔案內容會用作值。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddKeyPerFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, System::String ^ directoryPath, bool optional);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string directoryPath, bool optional);
static member AddKeyPerFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * string * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddKeyPerFile (builder As IConfigurationBuilder, directoryPath As String, optional As Boolean) As IConfigurationBuilder

參數

builder
IConfigurationBuilder

要新增的目標 IConfigurationBuilder

directoryPath
String

目錄的路徑。

optional
Boolean

目錄是否為選擇性。

傳回

IConfigurationBuilder

適用於

AddKeyPerFile(IConfigurationBuilder, String, Boolean, Boolean)

來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs
來源:
KeyPerFileConfigurationBuilderExtensions.cs

使用目錄中的檔案新增組態。 檔案名稱會用作索引建,檔案內容會用作值。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddKeyPerFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, System::String ^ directoryPath, bool optional, bool reloadOnChange);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string directoryPath, bool optional, bool reloadOnChange);
static member AddKeyPerFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * string * bool * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddKeyPerFile (builder As IConfigurationBuilder, directoryPath As String, optional As Boolean, reloadOnChange As Boolean) As IConfigurationBuilder

參數

builder
IConfigurationBuilder

要新增的目標 IConfigurationBuilder

directoryPath
String

目錄的路徑。

optional
Boolean

目錄是否為選擇性。

reloadOnChange
Boolean

如果檔案已變更、新增或移除,是否應該重載組態。

傳回

IConfigurationBuilder

適用於