public IEnumerable <IBackend> GetConfiguredBackends(ISystemMetricsService systemMetrics) { if (_log.IsInfoEnabled) { var availableBackendsString = String.Join(", ", AvailableBackends.Select(x => x.Name)); _log.InfoFormat("Available Backends: {0}", availableBackendsString); } foreach (var pair in BackendConfigurations) { string backendName = pair.Key; IBackend backend = AvailableBackends.FirstOrDefault(x => x.Name.Equals(backendName, StringComparison.OrdinalIgnoreCase)); if (backend == null) { _log.WarnFormat("Unrecognized backend configuration for \"{0}\". Backend will be ignored.", backendName); continue; } backend.Configure(Name, pair.Value, systemMetrics); yield return(backend); } }