EnvironmentVariablesExtensions.AddEnvironmentVariables Method

Definition

Overloads

AddEnvironmentVariables(IConfigurationBuilder)

Adds an IConfigurationProvider that reads configuration values from environment variables.

AddEnvironmentVariables(IConfigurationBuilder, Action<EnvironmentVariablesConfigurationSource>)

Adds an IConfigurationProvider that reads configuration values from environment variables.

AddEnvironmentVariables(IConfigurationBuilder, String)

Adds an IConfigurationProvider that reads configuration values from environment variables with a specified prefix.

AddEnvironmentVariables(IConfigurationBuilder)

Adds an IConfigurationProvider that reads configuration values from environment variables.

public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddEnvironmentVariables (this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder);
Parameters
configurationBuilder
IConfigurationBuilder

The IConfigurationBuilder to add to.

Returns

AddEnvironmentVariables(IConfigurationBuilder, Action<EnvironmentVariablesConfigurationSource>)

Adds an IConfigurationProvider that reads configuration values from environment variables.

public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddEnvironmentVariables (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Action<Microsoft.Extensions.Configuration.EnvironmentVariables.EnvironmentVariablesConfigurationSource> configureSource);
Parameters
configureSource
Action<EnvironmentVariablesConfigurationSource>

Configures the source.

Returns

AddEnvironmentVariables(IConfigurationBuilder, String)

Adds an IConfigurationProvider that reads configuration values from environment variables with a specified prefix.

public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddEnvironmentVariables (this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, string prefix);
Parameters
configurationBuilder
IConfigurationBuilder

The IConfigurationBuilder to add to.

prefix
String

The prefix that environment variable names must start with. The prefix will be removed from the environment variable names.

Returns

Applies to