internal static async Task <bool> IsLatestInstalled(string dev_mod)
        {
            var release = await LoadLatestModRelease(dev_mod);

            var latestTag = release.Tag_name;

            return(InstalledVersions.Any(x => x.Tag_name.ToLower().Equals(latestTag.ToLower())));
        }
Example #2
0
        public BatchRunnerModel(IApplicationProvider appProvider, IRecentFilesManager recentFilesMgr)
        {
            m_AppProvider    = appProvider;
            m_RecentFilesMgr = recentFilesMgr;
            RecentFiles      = new ObservableCollection <string>(m_RecentFilesMgr.RecentFiles);

            InstalledVersions = m_AppProvider.GetInstalledVersions().ToArray();

            if (!InstalledVersions.Any())
            {
                throw new UserMessageException("Failed to detect any installed version of the host application");
            }
        }
Example #3
0
        public BatchRunnerModel(IApplicationProvider appProvider, IRecentFilesManager recentFilesMgr,
                                IMacroFileFilterProvider macroFilterProvider, Func <BatchJob, IBatchRunJobExecutor> execFact)
        {
            m_AppProvider    = appProvider;
            m_RecentFilesMgr = recentFilesMgr;
            RecentFiles      = new ObservableCollection <string>(m_RecentFilesMgr.RecentFiles);

            InputFilesFilter = appProvider.InputFilesFilter;
            MacroFilesFilter = macroFilterProvider.GetSupportedMacros()
                               .Union(new FileFilter[] { FileFilter.AllFiles }).ToArray();

            m_ExecFact = execFact;

            InstalledVersions = m_AppProvider.GetInstalledVersions().ToArray();

            if (!InstalledVersions.Any())
            {
                throw new UserMessageException("Failed to detect any installed version of the host application");
            }
        }