Class HostApplicationBuilderConfigurationExtensions
Provides configuration-source operations for IHostApplicationBuilder.
Inherited Members
Namespace: Eigenverft.NetLib.Infrastructure.Hosting.Configuration.Sources
Assembly: Eigenverft.NetLib.Infrastructure.dll
Syntax
public static class HostApplicationBuilderConfigurationExtensions
Methods
| Edit this page View SourceResetToMinimalConfigurationSources<TBuilder>(TBuilder, bool, bool)
Clears all configuration sources and adds the selected minimal process-level sources.
Declaration
public static TBuilder ResetToMinimalConfigurationSources<TBuilder>(this TBuilder builder, bool includeCommandLineArguments = false, bool includeEnvironmentVariables = true) where TBuilder : IHostApplicationBuilder
Parameters
| Type | Name | Description |
|---|---|---|
| TBuilder | builder | The builder to modify. |
| bool | includeCommandLineArguments | Whether to add command-line configuration from the current process arguments, excluding the executable path. |
| bool | includeEnvironmentVariables | Whether to add environment-variable configuration. |
Returns
| Type | Description |
|---|---|
| TBuilder | The same builder instance for chaining. |
Type Parameters
| Name | Description |
|---|---|
| TBuilder |
Remarks
Call this method before adding other configuration providers because it clears the existing source collection. Environment variables are added before command-line arguments, so command-line values have higher precedence.