예제 #1
0
 public void Reset()
 {
     Info             = new ClientFiles();
     Info.LastUpdated = DateTime.Now;
     // We initialize an empty one.
     Info.Files = new List <ClientFile>();
     Save();
 }
예제 #2
0
        private void Load()
        {
            var contents = File.ReadAllText(filePath);

            Info = JsonConvert.DeserializeObject <ClientFiles>(contents);

            if (Info == null)
            {
                // TODO: Add logging.
                Reset();
            }
        }