public EndpointRegistry(IHealthMonitorTypeRegistry healthMonitorTypeRegistry, IEndpointConfigurationRepository endpointConfigurationRepository, IEndpointStatsRepository statsRepository) { _healthMonitorTypeRegistry = healthMonitorTypeRegistry; _endpointConfigurationRepository = endpointConfigurationRepository; _statsRepository = statsRepository; foreach (var endpoint in _endpointConfigurationRepository.LoadEndpoints()) { if (_endpoints.TryAdd(endpoint.Identity.GetNaturalKey(), endpoint)) { _endpointsByGuid.TryAdd(endpoint.Identity.Id, endpoint); } } }
public EndpointRegistry( IHealthMonitorTypeRegistry healthMonitorTypeRegistry, IEndpointConfigurationRepository endpointConfigurationRepository, IEndpointStatsManager statsManager, ITimeCoordinator timeCoordinator) { _healthMonitorTypeRegistry = healthMonitorTypeRegistry; _endpointConfigurationRepository = endpointConfigurationRepository; _endpointStatsManager = statsManager; _timeCoordinator = timeCoordinator; foreach (var endpoint in _endpointConfigurationRepository.LoadEndpoints()) { if (_endpoints.TryAdd(endpoint.Identity.GetNaturalKey(), endpoint)) { _endpointsByGuid.TryAdd(endpoint.Identity.Id, endpoint); } } }