Ejemplo n.º 1
0
        public static TValue GetValue <TValue>(this IDriverConfiguration configuration, string key, TValue defaultValue)
        {
            var value = configuration.GetSection(key).Value;

            if (value != null)
            {
                return((TValue)value);
            }
            return(defaultValue);
        }
Ejemplo n.º 2
0
 public static object GetValue(this IDriverConfiguration configuration, string key, object defaultValue)
 {
     return(configuration.GetSection(key).Value ?? defaultValue);
 }