private IList<ITask> MapTasks(string hostName, SqlToGraphiteConfigTemplatesWorkItemsTaskSet workItem, GraphiteClients clients) { var tasks = new List<ITask>(); foreach (var item in workItem.Task) { var c = clients.Get(item.client); tasks.Add(CreateTask(hostName, c, item)); } return tasks; }
public IList<ITaskSet> Map(List<SqlToGraphiteConfigTemplatesWorkItemsTaskSet> list, GraphiteClients clients) { var taskSets = new List<ITaskSet>(); foreach (SqlToGraphiteConfigTemplatesWorkItemsTaskSet taskSet in list) { var fequency = int.Parse(taskSet.frequency); var tasks = this.MapTasks(hostname, taskSet, clients); taskSets.Add(new TaskSet(tasks, stop, fequency)); } return taskSets; }