protected override async Task ExecuteAsync(CancellationToken stoppingToken) { await _systemOperationsDispatcher.StartTracking(); await _clientOperationsDispatcher.StartMonitoring(new StartMonitoringModel(new Uri("http://ya.ru"), RefreshPeriod.FromSeconds(3))); await _clientOperationsDispatcher.StartMonitoring(new StartMonitoringModel(new Uri("http://notexisturl1234567890.ru"), RefreshPeriod.FromSeconds(4))); await _clientOperationsDispatcher.StartMonitoring(new StartMonitoringModel(new Uri("http://localhost:5000/alwaysOk"), RefreshPeriod.FromSeconds(5))); await _clientOperationsDispatcher.StartMonitoring(new StartMonitoringModel(new Uri("http://localhost:5000/alwaysFail"), RefreshPeriod.FromSeconds(5))); await _clientOperationsDispatcher.StartMonitoring(new StartMonitoringModel(new Uri("http://localhost:5000/alwaysLong"), RefreshPeriod.FromSeconds(5))); await _clientOperationsDispatcher.StartMonitoring(new StartMonitoringModel(new Uri("http://localhost:5000/random"), RefreshPeriod.FromSeconds(1))); }
public async Task CreateRecord(string uri, ulong refreshTme) { await _availabilityTracker.StartMonitoring(new StartMonitoringModel(new Uri(uri), RefreshPeriod.FromSeconds(refreshTme))); }