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);
            }
        }
示例#3
0
 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);
 }
示例#5
0
 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);
 }