private async Task PopulateResourceNames(WatchmanServiceConfiguration <TAlarmConfig> serviceConfig) { foreach (var group in serviceConfig.AlertingGroups) { await _populator.PopulateResourceNames(group); } }
private async Task <PopulatedServiceConfiguration <TAlarmConfig, T> > PopulateResourceNames(WatchmanServiceConfiguration <TAlarmConfig> serviceConfig) { //TODO: maybe move some of this into the populator var items = new List <PopulatedServiceAlertingGroup <TAlarmConfig, T> >(); foreach (var group in serviceConfig.AlertingGroups) { var populated = await _populator.PopulateResourceNames(group); items.Add(populated); } return(new PopulatedServiceConfiguration <TAlarmConfig, T>( serviceConfig.ServiceName, items)); }