Class ConfigurationExtensionMethods
Inheritance
ConfigurationExtensionMethods
Assembly: Benday.Common.dll
Syntax
public static class ConfigurationExtensionMethods
Methods
|
Edit this page
View Source
GetStringThrowIfNullOrEmpty(IConfiguration, string)
This method retrieves a value from the configuration and returns it as a string. If the key does not exist or the value is null or empty, it throws an exception.
Declaration
public static string GetStringThrowIfNullOrEmpty(this IConfiguration config, string key)
Parameters
Returns
|
Edit this page
View Source
SafeGetString(IConfiguration, string, string)
This method retrieves a value from the configuration and returns it as a string. If the key does not exist or the value is null, it returns the default value.
Declaration
public static string SafeGetString(this IConfiguration config, string key, string defaultValue = "")
Parameters
Returns