mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
check if preset exists in getpreset
This commit is contained in:
parent
a21d820af1
commit
5294612d03
@ -207,7 +207,17 @@ namespace Bloxstrap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string? GetPreset(string name) => GetValue(PresetFlags[name]);
|
public string? GetPreset(string name)
|
||||||
|
{
|
||||||
|
if (!PresetFlags.ContainsKey(name))
|
||||||
|
{
|
||||||
|
App.Logger.WriteLine("FastFlagManager::GetPreset", $"Could not find preset {name}");
|
||||||
|
Debug.Assert(false, $"Could not find preset {name}");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetValue(PresetFlags[name]);
|
||||||
|
}
|
||||||
|
|
||||||
public T GetPresetEnum<T>(IReadOnlyDictionary<T, string> mapping, string prefix, string value) where T : Enum
|
public T GetPresetEnum<T>(IReadOnlyDictionary<T, string> mapping, string prefix, string value) where T : Enum
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user