Beispiel #1
0
 public JsonStorage(FileOperationsWrapper saver)
 {
     this.saver = saver;
     var jsonString = GetJsonString();
     cacheStorage = DeserializeToListOfTasks(jsonString);
     currentId = cacheStorage.Any() ? cacheStorage.Max(t => t.Id) : 0;
 }
Beispiel #2
0
        public JsonStorage(FileOperationsWrapper saver)
        {
            this.saver = saver;
            var jsonString = GetJsonString();

            cacheStorage = DeserializeToListOfTasks(jsonString);
            currentId    = cacheStorage.Any() ? cacheStorage.Max(t => t.Id) : 0;
        }