예제 #1
0
        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();
            }
        }
예제 #2
0
        public void execute(List <string> flags)
        {
            List <Event> matching = EONETDataset.events;

            matching = GenericOperations.filterList(matching, flags, mp);

            Console.WriteLine();
            ReportingUtils.printStatistics(matching);
        }