예제 #1
0
        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);
        }
예제 #2
0
 public IEnumerable <T> GetAll()
 {
     return(Manager.Deserialize <T>());
 }