CommandLineConfigurationProvider Class¶
A command line based Microsoft.Extensions.Configuration.ConfigurationProvider.
- Namespace
Microsoft.Extensions.Configuration.CommandLine- Assemblies
- Microsoft.Extensions.Configuration.CommandLine
Syntax¶
public class CommandLineConfigurationProvider : ConfigurationProvider, IConfigurationProvider
-
class
Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationProvider
Constructors¶
-
CommandLineConfigurationProvider(System.Collections.Generic.IEnumerable<System.String>, System.Collections.Generic.IDictionary<System.String, System.String>)¶ Initializes a new instance.
Arguments: - args (System.Collections.Generic.IEnumerable<System.String>) – The command line args.
- switchMappings (System.Collections.Generic.IDictionary<System.String>) – The switch mappings.
public CommandLineConfigurationProvider(IEnumerable<string> args, IDictionary<string, string> switchMappings = null)
-
Properties¶
-
Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationProvider.Args¶ The command line arguments.
Return type: System.Collections.Generic.IEnumerable<System.String> protected IEnumerable<string> Args { get; }
-