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

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