Example #1
0
        public IEnumerable <IModule> GetUpdatedModules(IEnumerable <IModule> modules)
        {
            List <IModule> result = new List <IModule>();

            foreach (IModule module in modules)
            {
                ModuleStatus status = mItems.SingleOrDefault(x => x.ModuleName == module.Name);
                if (status != null)
                {
                    ModuleStatus currentStatus = ModuleStatus.FromModule(module);
                    if (status.AssemblyFullName != currentStatus.AssemblyFullName || status.AssemblyVersion != currentStatus.AssemblyVersion)
                    {
                        result.Add(module);
                    }
                }
            }
            return(result);
        }
Example #2
0
 public void UpdateEntriesForModules(IEnumerable <IModule> modules)
 {
     mLog.Debug("Updating modules {0}", String.Join(", ", modules.Select(x => x.Name)));
     foreach (IModule module in modules)
     {
         ModuleStatus currentStatus = ModuleStatus.FromModule(module);
         ModuleStatus status        = mItems.SingleOrDefault(x => x.ModuleName == module.Name);
         if (status != null)
         {
             status.AssemblyFullName = currentStatus.AssemblyFullName;
             status.AssemblyVersion  = currentStatus.AssemblyVersion;
         }
         else
         {
             mItems.Add(currentStatus);
         }
     }
     StoreItems();
 }