better deserialization

This commit is contained in:
Nicolas Constant 2021-05-28 21:09:09 -04:00
parent 7ed993e51d
commit 0e787bbca8
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 11 additions and 4 deletions

View File

@ -89,6 +89,8 @@ namespace BSLManager.Tools
}
private LocalSettingsData GetLocalSettingsFile()
{
try
{
if (!File.Exists(LocalFileName)) return null;
@ -96,6 +98,11 @@ namespace BSLManager.Tools
var content = JsonConvert.DeserializeObject<LocalSettingsData>(jsonContent);
return content;
}
catch (Exception)
{
return null;
}
}
private void SaveLocalSettings(LocalSettingsData data)
{