Example #1
0
 /// <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);
 }
Example #2
0
        public MenuViewModel(
            IApplicationCloser applicationCloser,
            IDialogService dialogService)
        {
            _dialogService = dialogService;

            ExitCommand  = ReactiveCommand.Create(applicationCloser.CloseApp);
            AboutCommand = ReactiveCommand.CreateFromTask(ShowAboutDialogAsync);
        }
Example #3
0
        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));
        }
Example #4
0
 public MenuViewModel(IApplicationCloser applicationCloser)
 {
     ExitCommand = ReactiveCommand.Create(applicationCloser.CloseApp);
 }