// check for updates for the matched template, based on the Identity
        private async Task CheckForTemplateUpdateAsync()
        {
            if (!_settingsLoader.InstallUnitDescriptorCache.TryGetDescriptorForTemplate(_templateToInvoke.Info, out IInstallUnitDescriptor descriptor))
            {
                Reporter.Error.WriteLine(string.Format(LocalizableStrings.InstallDescriptor_NotFound, _templateToInvoke.Info.Identity));
                return;
            }

            List <IInstallUnitDescriptor> descriptorList = new List <IInstallUnitDescriptor>()
            {
                descriptor
            };
            TemplateUpdateChecker updateChecker     = new TemplateUpdateChecker(_environment);
            IUpdateCheckResult    updateCheckResult = await updateChecker.CheckForUpdatesAsync(descriptorList);

            if (updateCheckResult.Updates.Count == 0)
            {
                return;
            }
            else if (updateCheckResult.Updates.Count == 1)
            {
                DisplayUpdateMessage(updateCheckResult.Updates[0]);
            }
            else
            {
                Reporter.Error.WriteLine(string.Format(LocalizableStrings.UpdateCheck_UnknownError, descriptor.Identifier));
            }
        }
 public TemplateUpdateCoordinator(IEngineEnvironmentSettings environmentSettings, IInstaller installer)
 {
     _environmentSettings = environmentSettings;
     _installer           = installer;
     _updateChecker       = new TemplateUpdateChecker(_environmentSettings);
 }