Example #1
0
        static void PrintItem(TreeLogItem item, int level)
        {
            var lvl_offset = new string(' ', (level + 1) * 2);

            if (item.Unresolved)
            {
                Console.WriteLine(string.Format("{0}{1}{2}{3}",
                                                item.Start,
                                                item.Duration.ToString().PadLeft(5),
                                                lvl_offset,
                                                "Unresolved"));
            }
            else
            {
                Console.WriteLine(string.Format("{0}{1}{2}{3}",
                                                item.Start,
                                                item.Duration.ToString().PadLeft(5),
                                                lvl_offset,
                                                item.Method.Replace(PatternDefaultNs, "")));
            }
            if (item.Children != null)
            {
                item.Children.OrderBy(it => it.Start).ToList().ForEach(it => PrintItem(it, level + 1));
            }
        }
Example #2
0
 static void PrintItem(TreeLogItem item)
 {
     PrintItem(item, 0); Console.WriteLine();
 }