예제 #1
0
        public static IEnumerable <DebugEvent> GetEvents(string eventsDataString)
        {
            var array = Split(eventsDataString, eventSplitter);

            foreach (string eventDataString in array)
            {
                DebugEvent debugEvent = null;

                try
                {
                    debugEvent = new DebugEvent(eventDataString);
                }
                catch { }

                if (debugEvent != null)
                {
                    yield return(debugEvent);
                }
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                return;
            }

            IEnumerable <DebugEvent> allEvents = Enumerable.Empty <DebugEvent>();

            foreach (string path in args)
            {
                allEvents = allEvents.Concat(DebugEvent.GetEvents(File.ReadAllText(path)));
            }

            foreach (DebugEvent debugEvent in allEvents.OrderBy(e => e.Time).ThenBy(e => e.Count))
            {
                Console.WriteLine(debugEvent.ToString());
                Console.WriteLine();
            }

            Console.ReadLine();
        }