I want to have a property in my App.xaml.cs which look like:
private static Settings _settings = null;
public static Settings AppSettings
{
get
{
if(_settings == null)
_settings = await Settings.Deserialize();
return _settings;
}
}
In the Settings.Deserialize() I am reading setting from file so it have next signature:
public static async Task<Settings> Deserialize() { ... }
I can not use await in the property. But what is the good solution in this case ?