Currently possible exceptions are not directly handled and caught in the SettingsService. Would it be better to handle them here?
example Settings/Adapters/LocalFileSettingsAdapter.cs
new
public (bool successful, string result) ReadString(string key)
{
if (_container.Values.ContainsKey(key))
{
return (true, _container.Values[key].ToString());
}
else
{
return (false, string.Empty);
}
}
old
public string ReadString(string key)
=> _container.Values[key].ToString();
I have already implemented many things in my fork:
https://github.com/jp-weber/Template10/tree/master/Source/Template10.Extras/Services/Settings
Currently possible exceptions are not directly handled and caught in the SettingsService. Would it be better to handle them here?
example Settings/Adapters/LocalFileSettingsAdapter.cs
new
old
I have already implemented many things in my fork:
https://github.com/jp-weber/Template10/tree/master/Source/Template10.Extras/Services/Settings