public object ReadConfigGenericValue(DefaultValueArgument argument) { if (_genericConfig == null) { return(null); } if (!_genericConfig.Has(argument.ConfigPath)) { return(null); } return(_genericConfig.GetType() .GetMethod("Get", BindingFlags.Public | BindingFlags.Instance) ?.MakeGenericMethod(argument.ValueType) .Invoke(_genericConfig, new object[] { argument.ConfigPath })); }