internal static void Save(string fileName, RepoStore store) { var serializer = new XmlSerializer(typeof(RepoStore)); using (var fis = new FileStream(fileName, FileMode.Create)) serializer.Serialize(fis, store); }
// deserialize downloaded repo.xml and check if it has updates private void CheckStoreForUpdates(string tmpStore) { RepoStore = RepoStore.Load(tmpStore); DateTime lastChecked = RepoStore.Lastchecked; DateTime lastUpdated = RepoStore.LastUpdated; if (lastChecked == null || lastUpdated > lastChecked) { UpdatesAvailable = true; } //Add-check version for updates---- //------------------------------- RepoStore.Lastchecked = DateTime.Now; }