public void execute(List <string> flags) { List <Event> matching = EONETDataset.events; matching = GenericOperations.filterList(matching, flags, mp); Dictionary <string, List <Event> > category2Events = new Dictionary <string, List <Event> >(); foreach (Event e in matching) { foreach (Category c in e.categories) { if (category2Events.ContainsKey(c.id) == false) { category2Events[c.id] = new List <Event>(); } category2Events[c.id].Add(e); } } Console.WriteLine(); foreach (KeyValuePair <string, List <Event> > item in category2Events) { Console.WriteLine($"{item.Key}:"); ReportingUtils.printStatistics(item.Value); Console.WriteLine(); } }
public void execute(List <string> flags) { List <Event> matching = EONETDataset.events; matching = GenericOperations.filterList(matching, flags, mp); Console.WriteLine(); ReportingUtils.printStatistics(matching); }
public void execute(List <string> flags) { flags = GenericOperations.removeRepeatingElements(flags).ToList(); bool fullInfo = GenericOperations.checkForFullInfo(flags); List <Event> matching = EONETDataset.events; matching = GenericOperations.filterList(matching, flags, mp); GenericOperations.printList(matching, fullInfo); Console.WriteLine($"MatchingCount: {matching.Count}"); }