private void MarkModulesAsInstalled(IEnumerable <DependencyInfo> modules)
 {
     foreach (var module in modules)
     {
         var latestInfo = CompletePackageInfosList.FirstOrDefault(p => p.PackageId == PackageInfo.FormatPackageId(module));
         if (latestInfo == null)
         {
             Debug.LogWarning("Module does not have package info: " + module.name);
         }
         if (latestInfo != null && !latestInfo.IsInstalled)
         {
             latestInfo.IsInstalledByDependency = true;
         }
     }
 }
        /// <summary>
        /// We need no mark modules that are a dependency of any package/module as installed.
        /// This is how the module system currently behaves, so the UI needs to match this.
        /// </summary>
        private void MarkDependentModulesAsInstalled()
        {
            // Reset previous installed state
            foreach (var packageInfo in CompletePackageInfosList.Where(p => p.IsBuiltIn))
            {
                packageInfo.IsInstalledByDependency = false;
            }

            // Set dependent installed state
            var installedPackages = LatestListPackages.Where(p => p.IsInstalled);

            foreach (var package in installedPackages)
            {
                MarkModulesAsInstalled(package.DependentModules);
            }
        }