IConfiguration Rozhraní

Definice

Představuje sadu vlastností konfigurace aplikace klíč/hodnota.Represents a set of key/value application configuration properties.

public interface class IConfiguration
public interface IConfiguration
type IConfiguration = interface
Public Interface IConfiguration
Odvozené

Vlastnosti

Item[String]

Získá nebo nastaví hodnotu konfigurace.Gets or sets a configuration value.

Metody

GetChildren()

Získá bezprostřední dílčí oddíly konfigurace následníka.Gets the immediate descendant configuration sub-sections.

GetReloadToken()

Vrátí IChangeToken , který lze použít ke zjištění, zda je tato konfigurace znovu načtena.Returns a IChangeToken that can be used to observe when this configuration is reloaded.

GetSection(String)

Získá dílčí oddíl konfigurace se zadaným klíčem.Gets a configuration sub-section with the specified key.

Metody rozšíření

Bind(IConfiguration, Object)

Pokusí se vytvořit instanci dané instance objektu s hodnotami konfigurace porovnáním názvů vlastností proti konfiguračním klíčům.Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively.

Bind(IConfiguration, Object, Action<BinderOptions>)

Pokusí se vytvořit instanci dané instance objektu s hodnotami konfigurace porovnáním názvů vlastností proti konfiguračním klíčům.Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively.

Bind(IConfiguration, String, Object)

Pokusí se vytvořit instanci dané instance objektu s oddílem konfigurace zadaným klíčem tak, že se rekurzivně shodují názvy vlastností proti konfiguračním klíčům.Attempts to bind the given object instance to the configuration section specified by the key by matching property names against configuration keys recursively.

Get(IConfiguration, Type)

Pokusí se vytvořit instanci instance konfigurace s novou instancí typu T. Pokud má tento oddíl konfigurace hodnotu, která bude použita.Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Jinak propojíte podle názvů vlastností na základě rekurzivních konfiguračních klíčů.Otherwise binding by matching property names against configuration keys recursively.

Get(IConfiguration, Type, Action<BinderOptions>)

Pokusí se vytvořit instanci instance konfigurace s novou instancí typu T. Pokud má tento oddíl konfigurace hodnotu, která bude použita.Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Jinak propojíte podle názvů vlastností na základě rekurzivních konfiguračních klíčů.Otherwise binding by matching property names against configuration keys recursively.

Get<T>(IConfiguration)

Pokusí se vytvořit instanci instance konfigurace s novou instancí typu T. Pokud má tento oddíl konfigurace hodnotu, která bude použita.Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Jinak propojíte podle názvů vlastností na základě rekurzivních konfiguračních klíčů.Otherwise binding by matching property names against configuration keys recursively.

Get<T>(IConfiguration, Action<BinderOptions>)

Pokusí se vytvořit instanci instance konfigurace s novou instancí typu T. Pokud má tento oddíl konfigurace hodnotu, která bude použita.Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Jinak propojíte podle názvů vlastností na základě rekurzivních konfiguračních klíčů.Otherwise binding by matching property names against configuration keys recursively.

GetValue(IConfiguration, Type, String)

Extrahuje hodnotu se zadaným klíčem a převede ji na zadaný typ.Extracts the value with the specified key and converts it to the specified type.

GetValue(IConfiguration, Type, String, Object)

Extrahuje hodnotu se zadaným klíčem a převede ji na zadaný typ.Extracts the value with the specified key and converts it to the specified type.

GetValue<T>(IConfiguration, String)

Extrahuje hodnotu se zadaným klíčem a převede ji na typ T.Extracts the value with the specified key and converts it to type T.

GetValue<T>(IConfiguration, String, T)

Extrahuje hodnotu se zadaným klíčem a převede ji na typ T.Extracts the value with the specified key and converts it to type T.

AsEnumerable(IConfiguration)

Získat výčet párů klíč-hodnota v rámci IConfigurationGet the enumeration of key value pairs within the IConfiguration

AsEnumerable(IConfiguration, Boolean)

Získat výčet párů klíč-hodnota v rámci IConfigurationGet the enumeration of key value pairs within the IConfiguration

GetConnectionString(IConfiguration, String)

Zkrácený oddíl pro GetSection ("connectionStrings") [název].Shorthand for GetSection("ConnectionStrings")[name].

Platí pro