Пример #1
0
        /// <summary>
        ///     Initializes updater instance with proper engines.
        /// </summary>
        /// <param name="targetDirectory">directory to install modules to</param>
        /// <param name="modulesRepository">backend used to retrieve modules information. ie. WebServiceModulesRepository, WebModulesRepository, and so on</param>
        /// <param name="modulesOperations">backend used to unload / load modules</param>
        /// <param name="eventAggregator">event aggregator for providing events</param>
        /// <param name="modulePackager">packager used for unpacking packages</param>
        /// <param name="dependencyChecker">dependency checker engine used for validating the outcome</param>
        public NomadUpdater(string targetDirectory, IModulesRepository modulesRepository,
                            IModulesOperations modulesOperations,
                            IEventAggregator eventAggregator, IModulePackager modulePackager,
                            IDependencyChecker dependencyChecker, IModuleFinder moduleFinder)
        {
            Status = UpdaterStatus.Idle;

            _targetDirectory   = targetDirectory;
            _moduleFinder      = moduleFinder;
            _dependencyChecker = dependencyChecker;
            _modulePackager    = modulePackager;
            _modulesRepository = modulesRepository;
            _modulesOperations = modulesOperations;
            _eventAggregator   = eventAggregator;

            _modulesPackages = new List <ModulePackage>();
        }
Пример #2
0
        /// <summary>
        ///     Initializes updater instance with proper engines.
        /// </summary>
        /// <param name="targetDirectory">directory to install modules to</param>
        /// <param name="modulesRepository">backend used to retrieve modules information. ie. WebServiceModulesRepository, WebModulesRepository, and so on</param>
        /// <param name="modulesOperations">backend used to unload / load modules</param>
        /// <param name="eventAggregator">event aggregator for providing events</param>
        /// <param name="modulePackager">packager used for unpacking packages</param>
        /// <param name="dependencyChecker">dependency checker engine used for validating the outcome</param>
        public NomadUpdater(string targetDirectory, IModulesRepository modulesRepository,
            IModulesOperations modulesOperations,
            IEventAggregator eventAggregator, IModulePackager modulePackager,
            IDependencyChecker dependencyChecker, IModuleFinder moduleFinder)
        {
            Status = UpdaterStatus.Idle;

            _targetDirectory = targetDirectory;
            _moduleFinder = moduleFinder;
            _dependencyChecker = dependencyChecker;
            _modulePackager = modulePackager;
            _modulesRepository = modulesRepository;
            _modulesOperations = modulesOperations;
            _eventAggregator = eventAggregator;

            _modulesPackages = new List<ModulePackage>();
        }