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); }
public static object GetValue(this IDriverConfiguration configuration, string key, object defaultValue) { return(configuration.GetSection(key).Value ?? defaultValue); }