private static int CheckSettings() { var Manager = new ToFolder(Path + @"\\Settings.json"); Settings SettingsData; try { SettingsData = Manager.Deserialize <Settings>()[0]; } catch (System.Exception) { SettingsData = new Settings { NumberOfRealisation = 1 }; Manager.ClearFile(); Manager.Serialize(SettingsData); } return(SettingsData.NumberOfRealisation); }
public void AddData(T data) { Manager.Serialize(data); }