Partager via


EnvironmentVariablesExtensions.AddEnvironmentVariables Méthode

Définition

Surcharges

AddEnvironmentVariables(IConfigurationBuilder)

Ajoute un IConfigurationProvider qui lit les valeurs de configuration à partir des variables d’environnement.

AddEnvironmentVariables(IConfigurationBuilder, Action<EnvironmentVariablesConfigurationSource>)

Ajoute un IConfigurationProvider qui lit les valeurs de configuration à partir des variables d’environnement.

AddEnvironmentVariables(IConfigurationBuilder, String)

Ajoute un IConfigurationProvider qui lit les valeurs de configuration à partir des variables d’environnement avec un préfixe spécifié.

AddEnvironmentVariables(IConfigurationBuilder)

Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs

Ajoute un IConfigurationProvider qui lit les valeurs de configuration à partir des variables d’environnement.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddEnvironmentVariables(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ configurationBuilder);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddEnvironmentVariables (this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder);
static member AddEnvironmentVariables : Microsoft.Extensions.Configuration.IConfigurationBuilder -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddEnvironmentVariables (configurationBuilder As IConfigurationBuilder) As IConfigurationBuilder

Paramètres

configurationBuilder
IConfigurationBuilder

IConfigurationBuilder auquel ajouter.

Retours

Le IConfigurationBuilder.

S’applique à

AddEnvironmentVariables(IConfigurationBuilder, Action<EnvironmentVariablesConfigurationSource>)

Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs

Ajoute un IConfigurationProvider qui lit les valeurs de configuration à partir des variables d’environnement.

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

Paramètres

configureSource
Action<EnvironmentVariablesConfigurationSource>

Configure la source.

Retours

Le IConfigurationBuilder.

S’applique à

AddEnvironmentVariables(IConfigurationBuilder, String)

Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs
Source:
EnvironmentVariablesExtensions.cs

Ajoute un IConfigurationProvider qui lit les valeurs de configuration à partir des variables d’environnement avec un préfixe spécifié.

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

Paramètres

configurationBuilder
IConfigurationBuilder

IConfigurationBuilder auquel ajouter.

prefix
String

Préfixe avec lequel les noms de variable d’environnement doivent commencer. Le préfixe sera supprimé des noms de variables d’environnement.

Retours

Le IConfigurationBuilder.

S’applique à