コード例 #1
0
 public void SetRoot(ProfilingNode profilingNode)
 {
     Root      = profilingNode;
     BaseLevel = new ReadOnlyCollection <ProfilingNode>(new[] { Root });
     OnPropertyChanged("BaseLevel");
     OnPropertyChanged("Root");
 }
コード例 #2
0
        private ProfilingNode getOrCreateNode(ProfilingPoint rootPoint)
        {
            if (nodes.ContainsKey(rootPoint))
            {
                return(nodes[rootPoint]);
            }
            var node = new ProfilingNode();

            node.Name = rootPoint.Name;
            nodes.Add(rootPoint, node);
            return(node);
        }
コード例 #3
0
        public ProfilerDisplayModel()
        {
            var r = new ProfilingNode();

            r.Children.Add(new ProfilingNode()
            {
                Name = "Boe"
            });
            r.Children.Add(new ProfilingNode()
            {
                Name = "Ba"
            });
            SetRoot(r);


            Buttons = new ObservableCollection <ProfilerCommand>();
            Buttons.Add(new ProfilerCommand("Start", delegate { Console.WriteLine("Start"); }));
            Buttons.Add(new ProfilerCommand("Stop", delegate { Console.WriteLine("Stop"); }));
        }