KeyPerFileConfigurationBuilderExtensions.AddKeyPerFile Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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) |
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) |
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) |
Adds configuration using files from a directory. File names are used as the key, file contents are used as the value. |
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
- builder
- IConfigurationBuilder
The IConfigurationBuilder to add to.
- configureSource
- Action<KeyPerFileConfigurationSource>
Configures the source.
Returns
Applies to
AddKeyPerFile(IConfigurationBuilder, String)
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);
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
- builder
- IConfigurationBuilder
The IConfigurationBuilder to add to.
- directoryPath
- String
The path to the directory.
Returns
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
- builder
- IConfigurationBuilder
The IConfigurationBuilder to add to.
- directoryPath
- String
The path to the directory.
- optional
- Boolean
Whether the directory is optional.
Returns
Applies to
AddKeyPerFile(IConfigurationBuilder, String, Boolean, 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, 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
- builder
- IConfigurationBuilder
The IConfigurationBuilder to add to.
- directoryPath
- String
The path to the directory.
- optional
- Boolean
Whether the directory is optional.
- reloadOnChange
- Boolean
Whether the configuration should be reloaded if the files are changed, added or removed.