fix: BasicConfiguration not working properly with enum types
This commit is contained in:
@@ -12,7 +12,7 @@ public class BasicConfiguration : IConfiguration
|
|||||||
|
|
||||||
public IReadOnlyDictionary<string, object?> Values => values;
|
public IReadOnlyDictionary<string, object?> Values => values;
|
||||||
|
|
||||||
public T Get<T>(string key, T defaultValue) => Get<T>(key) ?? defaultValue;
|
public T Get<T>(string key, T defaultValue) => Has(key) ? Get<T>(key) ?? defaultValue : defaultValue;
|
||||||
public T? Get<T>(string key)
|
public T? Get<T>(string key)
|
||||||
{
|
{
|
||||||
if (!values.TryGetValue(key, out object? value))
|
if (!values.TryGetValue(key, out object? value))
|
||||||
|
|||||||
Reference in New Issue
Block a user