public PackageInstallationService(InstallationTaskQueue pendingInstalls, 
     RunningInstallationTaskList runningInstalls, 
     CompletedInstallationTaskList completedInstalls,
     IDeploymentService deploymentService,
     ILogger logger,
     IHubCommunicator hubCommunicator, 
     ILocalPackageCache agentCache, 
     IInstalledPackageArchive installCache, 
     RunningInstallationTaskList runningTasks, 
     IAgentSettingsManager settingsManager,
     IPackagesList allPackagesList,
     CurrentlyDownloadingList currentlyDownloadingList,
     INotificationService notificationService)
 {
     CompletedInstalls = completedInstalls;
     _deploymentService = deploymentService;
     _logger = logger;
     _hubCommunicator = hubCommunicator;
     _agentCache = agentCache;
     _installCache = installCache;
     _runningTasks = runningTasks;
     _settingsManager = settingsManager;
     _allPackagesList = allPackagesList;
     _currentlyDownloadingList = currentlyDownloadingList;
     _notificationService = notificationService;
     PendingInstalls = pendingInstalls;
     RunningInstalls = runningInstalls;
     TimedTask = new TimedSingleExecutionTask(5000, CheckForNewInstallations, _logger);
 }
Esempio n. 2
0
 public AgentConfigurationService(IAgentSettings agentSettings, IAgentConfigurationDownloader configurationDownloader)
 {
     if (agentSettings == null) throw new ArgumentNullException("agentSettings");
     if (configurationDownloader == null) throw new ArgumentNullException("configurationDownloader");
     _configurationDownloader = configurationDownloader;
     TimedTask = new TimedSingleExecutionTask(agentSettings.ConfigurationSyncIntervalMs, DownloadConfiguration, true);
 }
 public PackageDownloadingService(IAgentSettingsManager agentSettingsManager,
     IRetrievePackageQuery allPackagesQuery,
     ILocalPackageCache agentCache,
     IAgentConfigurationManager agentConfigurationManager,
     ILogger logger,
     IHubCommunicator hubCommunicator,
     IInstalledPackageArchive installCache,
     IPackageRepositoryFactory packageRepositoryFactory,
     IPackagesList allPackagesList,
     ICurrentlyDownloadingList currentlyDownloadingList,
     CompletedInstallationTaskList installationResults,
     IAgentWatchList watchList,
     IInstallationManager installationManager,INotificationService notificationService)
 {
     _settingsManager = agentSettingsManager;
     AllPackagesQuery = allPackagesQuery;
     AgentCache = agentCache;
     _agentConfigurationManager = agentConfigurationManager;
     _logger = logger;
     _hubCommunicator = hubCommunicator;
     _installCache = installCache;
     _packageRepository = packageRepositoryFactory.CreateRepository(agentSettingsManager.Settings.NuGetRepository);
     _allPackagesList = allPackagesList;
     _currentlyDownloadingList = currentlyDownloadingList;
     _installationResults = installationResults;
     _watchList = watchList;
     _installationManager = installationManager;
     _notificationService = notificationService;
     TimedTask = new TimedSingleExecutionTask(agentSettingsManager.Settings.PackageSyncIntervalMs, FetchPackages,
                                              _logger);
 }
Esempio n. 4
0
 public PackageDownloadingService(IAgentSettings agentSettings, IRetrievePackageQuery allPackagesQuery, ILocalPackageCache agentCache, IAgentConfigurationManager agentConfigurationManager)
 {
     _settings = agentSettings;
     AllPackagesQuery = allPackagesQuery;
     AgentCache = agentCache;
     _agentConfigurationManager = agentConfigurationManager;
     TimedTask = new TimedSingleExecutionTask(agentSettings.PackageSyncIntervalMs, FetchPackages);
 }
 public PackageInstallationService(InstallationTaskQueue pendingInstalls, 
     RunningInstallationTaskList runningInstalls, 
     CompletedInstallationTaskList completedInstalls,
     IDeploymentService deploymentService)
 {
     CompletedInstalls = completedInstalls;
     _deploymentService = deploymentService;
     PendingInstalls = pendingInstalls;
     RunningInstalls = runningInstalls;
     TimedTask = new TimedSingleExecutionTask(5000, CheckForNewInstallations);
 }
Esempio n. 6
0
 public AgentManager(IAgentRepository agentRepository, IAgentRemoteService agentRemoteService, ILog logger)
 {
     int updateInterval;
     if (!int.TryParse(ConfigurationManager.AppSettings["UpdateInterval"], out updateInterval))
     {
         updateInterval = 5000;
     }
     _agentRepository = agentRepository;
     _agentRemoteService = agentRemoteService;
     _logger = logger;
     UpdateTask = new TimedSingleExecutionTask(updateInterval, StartUpdateOnAllAgents, true);
     UpdateTask.Start(null);
 }
 public ActionExecutionService(PendingActionsQueue pendingActionsQueue, 
     CompletedActionsList completedActionsList,
     RunningActionsList runningActionsList,
     IAgentActionsService actionsService, IAgentActionsRepository actionsRepository,
     ILogger logger)
 {
     _logger = logger;
     PendingActionsQueue = pendingActionsQueue;
     CompletedActionsList = completedActionsList;
     RunningActionsList = runningActionsList;
     ActionsService = actionsService;
     _actionsRepository = actionsRepository;
     TimedTask = new TimedSingleExecutionTask(2000, CheckForPendingActions, _logger);
 }