/// <summary> /// Initialize a new instance of <see cref="WindowsPatcher" /> using an application closer /// </summary> /// <param name="applicationCloser">The application closer defines the procedure to safely shutdown this application</param> public WindowsPatcher(IApplicationCloser applicationCloser) { _applicationCloser = applicationCloser; Arguments = new List <UpdateArgument>(); ApplicationPath = Assembly.GetEntryAssembly().Location; BaseDirectory = Path.GetDirectoryName(ApplicationPath); Language = WindowsUpdaterTranslation.GetByCulture(CultureInfo.CurrentUICulture); }
public MenuViewModel( IApplicationCloser applicationCloser, IDialogService dialogService) { _dialogService = dialogService; ExitCommand = ReactiveCommand.Create(applicationCloser.CloseApp); AboutCommand = ReactiveCommand.CreateFromTask(ShowAboutDialogAsync); }
public UpdaterManagementService(ILoggerFactory loggerFactory, UpdaterManagementServiceConfiguration configuration) { _logger = loggerFactory.CreateLogger <UpdaterManagementService>(); _semaphore = new SemaphoreSlim(1, 1); _versionSource = configuration.VersionSource; _currentVersionDeterminer = configuration.CurrentVersionDeterminer; _applicationCloser = configuration.ApplicationCloser; _userInteractions = configuration.UserInteraction.ToArray(); _prepareSteps = configuration.UpdatePreparationSteps.ToArray(); _updaterCheckStrategy = configuration.CheckInterval.Accept(new SelectStrategyVisitor(this)); }
public MenuViewModel(IApplicationCloser applicationCloser) { ExitCommand = ReactiveCommand.Create(applicationCloser.CloseApp); }