// Singleton need this private ctor. Settings() { userSettings = LoadUserSettings(); userSettings.Normalized(); // replace null with empty object. UpdateSpeedTestPool(); UpdateFileLoggerSetting(); janitor = new VgcApis.Libs.Tasks.LazyGuy( () => GC.Collect(), VgcApis.Models.Consts.Intervals.LazyGcDelay, 5000) { Name = "Settings.GC()", }; lazyBookKeeper = new VgcApis.Libs.Tasks.LazyGuy( SaveUserSettingsWorker, VgcApis.Models.Consts.Intervals.LazySaveUserSettingsDelay, 500) { Name = "Settings.SaveSettings", }; }
// Singleton need this private ctor. Settings() { userSettings = LoadUserSettings(); userSettings.Normalized(); // replace null with empty object. }