JsonConfigurationExtensions.AddJsonFile JsonConfigurationExtensions.AddJsonFile JsonConfigurationExtensions.AddJsonFile JsonConfigurationExtensions.AddJsonFile Method

Definition

Overloads

AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>) AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>) AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>) AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>)

Adds a JSON configuration source to builder.

AddJsonFile(IConfigurationBuilder, String) AddJsonFile(IConfigurationBuilder, String) AddJsonFile(IConfigurationBuilder, String) AddJsonFile(IConfigurationBuilder, String)

Adds the JSON configuration provider at path to builder.

AddJsonFile(IConfigurationBuilder, String, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean)

Adds the JSON configuration provider at path to builder.

AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean)

Adds the JSON configuration provider at path to builder.

AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean)

Adds a JSON configuration source to builder.

AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>) AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>) AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>) AddJsonFile(IConfigurationBuilder, Action<JsonConfigurationSource>)

Adds a JSON configuration source to builder.

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

Parameters

configureSource
Action<JsonConfigurationSource>

Configures the source.

Returns

AddJsonFile(IConfigurationBuilder, String) AddJsonFile(IConfigurationBuilder, String) AddJsonFile(IConfigurationBuilder, String) AddJsonFile(IConfigurationBuilder, String)

Adds the JSON configuration provider at path to builder.

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

Parameters

path
String String String String

Path relative to the base path stored in Properties of builder.

Returns

AddJsonFile(IConfigurationBuilder, String, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean)

Adds the JSON configuration provider at path to builder.

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

Parameters

path
String String String String

Path relative to the base path stored in Properties of builder.

optional
Boolean Boolean Boolean Boolean

Whether the file is optional.

Returns

AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, String, Boolean, Boolean)

Adds the JSON configuration provider at path to builder.

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

Parameters

path
String String String String

Path relative to the base path stored in Properties of builder.

optional
Boolean Boolean Boolean Boolean

Whether the file is optional.

reloadOnChange
Boolean Boolean Boolean Boolean

Whether the configuration should be reloaded if the file changes.

Returns

AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean) AddJsonFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean)

Adds a JSON configuration source to builder.

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

Parameters

provider
IFileProvider IFileProvider IFileProvider IFileProvider

The IFileProvider to use to access the file.

path
String String String String

Path relative to the base path stored in Properties of builder.

optional
Boolean Boolean Boolean Boolean

Whether the file is optional.

reloadOnChange
Boolean Boolean Boolean Boolean

Whether the configuration should be reloaded if the file changes.

Returns

Applies to