CommandLineConfigurationProvider 类

定义

基于命令行的 ConfigurationProviderA command line based ConfigurationProvider.

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
继承
CommandLineConfigurationProvider

构造函数

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

初始化一个新实例。Initializes a new instance.

属性

Args

命令行参数。The command line arguments.

Data

此提供程序的配置键值对。The configuration key value pairs for this provider.

(继承自 ConfigurationProvider)

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetChildKeys(IEnumerable<String>, String)

返回此提供程序拥有的键列表。Returns the list of keys that this provider has.

(继承自 ConfigurationProvider)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetReloadToken()

返回可用于在重载此提供程序时进行侦听的 IChangeTokenReturns a IChangeToken that can be used to listen when this provider is reloaded.

(继承自 ConfigurationProvider)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
Load()

从命令行参数加载配置数据。Loads the configuration data from the command line args.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnReload()

触发重载更改令牌并创建一个新令牌。Triggers the reload change token and creates a new one.

(继承自 ConfigurationProvider)
Set(String, String)

为给定键设置一个值。Sets a value for a given key.

(继承自 ConfigurationProvider)
ToString()

生成一个表示此提供程序名称和相关详细信息的字符串。Generates a string representing this provider name and relevant details.

(继承自 ConfigurationProvider)
TryGet(String, String)

尝试查找给定键的值,如果找到一个值,则返回 true;否则返回 false。Attempts to find a value with the given key, returns true if one is found, false otherwise.

(继承自 ConfigurationProvider)

适用于