Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

CommandLineConfigurationProvider Class

Definition

Namespace:
Microsoft.Extensions.Configuration.CommandLine
Assembly:
Microsoft.Extensions.Configuration.CommandLine.dll
Package:
Microsoft.Extensions.Configuration.CommandLine v11.0.0-preview.5.26302.115
Source:
CommandLineConfigurationProvider.cs
Source:
CommandLineConfigurationProvider.cs
Source:
CommandLineConfigurationProvider.cs
Source:
CommandLineConfigurationProvider.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Provides configuration key-value pairs that are obtained from the command line.

public ref class CommandLineConfigurationProvider : Microsoft::Extensions::Configuration::ConfigurationProvider
public class CommandLineConfigurationProvider : Microsoft.Extensions.Configuration.ConfigurationProvider
type CommandLineConfigurationProvider = class
 inherit ConfigurationProvider
Public Class CommandLineConfigurationProvider
Inherits ConfigurationProvider
Inheritance
CommandLineConfigurationProvider

Remarks

For more information and examples, see Command-line configuration provider.

Constructors

Name Description
CommandLineConfigurationProvider(IEnumerable<String>, IDictionary<String,String>)

Initializes a new instance.

Properties

Name Description
Args

Gets the command-line arguments.

Data

Gets or sets the configuration key-value pairs for this provider.

(Inherited from ConfigurationProvider)

Methods

Name Description
GetChildKeys(IEnumerable<String>, String)

Returns the list of keys that this provider has.

(Inherited from ConfigurationProvider)
GetReloadToken()

Returns a IChangeToken that can be used to listen when this provider is reloaded.

(Inherited from ConfigurationProvider)
Load()

Loads the configuration data from the command-line arguments.

OnReload()

Triggers the reload change token and creates a new one.

(Inherited from ConfigurationProvider)
Set(String, String)

Sets a value for a given key.

(Inherited from ConfigurationProvider)
ToString()

Generates a string representing this provider name and relevant details.

(Inherited from ConfigurationProvider)
TryGet(String, String)

Attempts to find a value with the given key.

(Inherited from ConfigurationProvider)

Applies to


Feedback

Was this page helpful?