// Add some word here to spesify it's a singelton ? public static AppConfigService GetInstance() { if (AppConf == null) { lock (sr_InstanceLock) { if (AppConf == null) { try { AppConf = SerializerService.LoadFromFile <AppConfigService>( k_FilePath, typeof(AppConfigService)); } catch (Exception) { AppConf = new AppConfigService { StateSettings = new StateSettings() }; } } } } return(AppConf); }
public static void SaveToFile() { SerializerService.SaveToFile(k_FilePath, GetInstance()); }