21.346. Class ConfigurationExt
Namespace: ArmoniK.Core.Utils
Assembly: ArmoniK.Core.Utils.dll
Extends the functionality of the
public static class ConfigurationExt
21.346.1. Inheritance
21.346.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
21.346.3. Methods
21.346.3.1. GetInitializedValue<T>(IConfiguration, string)
Configure an object with the given configuration. If the object is not found in the configuration, a new object in returned.
public static T GetInitializedValue<T>(this IConfiguration configuration, string key) where T : new()
21.346.3.1.1. Parameters
configuration IConfiguration
Configurations used to populate the class
key string
Path to the Object in the configuration
21.346.3.1.2. Returns
T
The initialized object
21.346.3.1.3. Type Parameters
T
Type of the options class
21.346.3.2. GetRequiredValue<T>(IConfiguration, string)
Configure an object with the given configuration.
public static T GetRequiredValue<T>(this IConfiguration configuration, string key)
21.346.3.2.1. Parameters
configuration IConfiguration
Configurations used to populate the class
key string
Path to the Object in the configuration
21.346.3.2.2. Returns
T
The initialized object
21.346.3.2.3. Type Parameters
T
Type of the options class
21.346.3.2.4. Exceptions
the key is not found in the configurations.