Beispiel #1
0
 public LocalRepository(string localFolder, string id)
 {
     LocalFolder = localFolder + "\\Source\\";
     LocalFile   = localFolder + "\\state\\" + id + "\\local-repository.json";
     if (System.IO.File.Exists(LocalFile))
     {
         Files = new SortedDictionary <string, LocalRepositoryFile>(JsonStorage.ReadFile <LocalRepositoryFile[]>(LocalFile).ToDictionary(x => x.Url));
     }
     else
     {
         Files = new SortedDictionary <string, LocalRepositoryFile>();
     }
 }
Beispiel #2
0
 private void Save()
 {
     JsonStorage.WriteFile(Files.Values, LocalFile);
 }