KeyPerFileConfigurationBuilderExtensions.AddKeyPerFile Method

Definition

Overloads

AddKeyPerFile(IConfigurationBuilder, Action<KeyPerFileConfigurationSource>)

Adds configuration using files from a directory. File names are used as the key, file contents are used as the value.

AddKeyPerFile(IConfigurationBuilder, String)
AddKeyPerFile(IConfigurationBuilder, String, Boolean)

Adds configuration using files from a directory. File names are used as the key, file contents are used as the value.

AddKeyPerFile(IConfigurationBuilder, String, Boolean, Boolean)

AddKeyPerFile(IConfigurationBuilder, Action<KeyPerFileConfigurationSource>)

Adds configuration using files from a directory. File names are used as the key, file contents are used as the value.

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

Parameters

configureSource
Action<KeyPerFileConfigurationSource>

Configures the source.

Returns

IConfigurationBuilder

The IConfigurationBuilder.

Applies to

AddKeyPerFile(IConfigurationBuilder, String)

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

Parameters

directoryPath
String

Returns

IConfigurationBuilder

Applies to

AddKeyPerFile(IConfigurationBuilder, String, Boolean)

Adds configuration using files from a directory. File names are used as the key, file contents are used as the value.

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

Parameters

directoryPath
String

The path to the directory.

optional
Boolean

Whether the directory is optional.

Returns

IConfigurationBuilder

The IConfigurationBuilder.

Applies to

AddKeyPerFile(IConfigurationBuilder, String, Boolean, Boolean)

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

Parameters

directoryPath
String
optional
Boolean
reloadOnChange
Boolean

Returns

IConfigurationBuilder

Applies to