public UpdateChecker(GlobalSettingsContainer globalSettingsContainer, LazyContainer <INotificationProvider, IPriorityMetadata> notificationProviders) { this.globalSettingsContainer = globalSettingsContainer; this.timer.Elapsed += TimerOnElapsed; this.notificationProvider = notificationProviders.GetSupportedNotificationProvider(); }
public NotificationManager(LazyContainer <INotificationProvider, IPriorityMetadata> notificationProviders, BuildCache buildCache, IEqualityComparer <IBuild> buildEqualityComparer, ExportFactory <IBuildsStatusView> buildsExportFactory) { this.buildCache = buildCache; this.buildEqualityComparer = buildEqualityComparer; this.buildsExportFactory = buildsExportFactory; this.buildCache.CacheUpdated += (sender, args) => ShowNotification(); this.notificationProvider = notificationProviders.GetSupportedNotificationProvider(); }
public BuildMonitor(LazyContainer <IBuildProvider, IBuildProviderMetadata> buildProviders, LazyContainer <INotificationProvider, IPriorityMetadata> notificationProviders, IEqualityComparer <IBuildDefinition> buildDefinitionEqualityComparer, GeneralSettings generalSettings) { this.buildProviders = buildProviders; this.buildDefinitionEqualityComparer = buildDefinitionEqualityComparer; this.generalSettings = generalSettings; this.notificationProvider = notificationProviders.GetSupportedNotificationProvider(); this.timer.Elapsed += (sender, args) => BeginPollingBuildsAsync().GetAwaiter().GetResult(); this.timer.ProgressElapsed += (sender, args) => { OnProgressUpdated(MaximumProgress - this.timer.CurrentInterval); }; }