public void DoWork(Card[] cards, ITrello trello, IDisplay display) { foreach (var card in cards.Select(x => new ReleaseNotesCard(x))) { display.Write(string.Format("{0} - {1}", card.Labels, card.Name)); } }
public void DoWork(Card[] cards, ITrello trello, IDisplay display) { var cardsGroupedByLabel = cards .Select(x => new ReleaseNotesCard(x)) .GroupBy(x => x.Labels) .ToArray(); File.WriteAllText(_options.Output, Razor.Parse(File.ReadAllText(_options.Template), new { _options.SoftwareName, _options.SoftwareVersion, Groups = cardsGroupedByLabel })); }