private static void RemoveStaleUpdateNotification(UpdatesCategory category) { // ReSharper downloads and evaluates the xslt on a regular basis (every 24 hours), // but doesn't re-evaluate it after an install (it doesn't know when something is // installed!) so if there's a reminder to download this or an older version, remove it var thisVersion = GetThisVersion(); var updateInfo = category.UpdateInfos.FirstOrDefault(container => new Version(container.Data.ProductVersion) <= thisVersion); if (updateInfo != null) category.UpdateInfos.Remove(updateInfo); }
private static void RemoveStaleUpdateNotification(UpdatesCategory category) { // ReSharper downloads and evaluates the xslt on a regular basis (every 24 hours), // but doesn't re-evaluate it after an install (it doesn't know when something is // installed!) so if there's a reminder to download this or an older version, remove it var thisVersion = GetThisVersion(); var updateInfo = category.UpdateInfos.FirstOrDefault(container => new Version(container.Data.ProductVersion) <= thisVersion); if (updateInfo != null) { category.UpdateInfos.Remove(updateInfo); } }
public UpdatesNotifier([NotNull] Lifetime lifetime, [NotNull] UpdatesManager updatesManager) { _category = updatesManager.Categories.AddOrActivate(_pluginName, new Uri("https://raw.github.com/MrJul/ForTea/master/Updates.xslt")); _category.CustomizeLocalEnvironmentInfo.Advise(lifetime, CustomizeLocalEnvironmentInfo); RemoveStaleUpdateNotification(); }
public UpdatesForTeaCategoryOwner([NotNull] Lifetime lifetime, [NotNull] UpdatesManager updatesManager) { _category = updatesManager.Categories.AddOrActivate("ForTea", new Uri("https://raw.github.com/MrJul/ForTea/master/Updates.xslt")); _category.CustomizeLocalEnvironmentInfo.Advise(lifetime, CustomizeLocalEnvironmentInfo); }