Exemple #1
0
 public SettingService()
 {
     try
     {
         this.ReadFile();
     }
     catch (Exception e)
     {
         this.ToDoDataList = ToDoData.CreateDefault();
         this.SaveFile();
     }
 }
Exemple #2
0
        public void ReadFile()
        {
            var data = JsonSerializer.Deserialize <IEnumerable <ToDoData> >("ToDoDataList");

            this.ToDoDataList = data ?? ToDoData.CreateDefault();
        }