Beispiel #1
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));
        }
Beispiel #2
0
 public UpdateBuilder UseCurrentVersionDetermine(ICurrentVersionDeterminer currentVersionDeterminer)
 {
     _configuration.CurrentVersionDeterminer = currentVersionDeterminer;
     return(this);
 }