Beispiel #1
0
        public override void BuildChildNodes(ITreeBuilder builder, object dataObject)
        {
            ProfilingSnapshotCollection collection = (ProfilingSnapshotCollection)dataObject;

            foreach (IProfilingSnapshot snapshot in collection)
            {
                builder.AddChild(snapshot);
            }
            builder.Expanded = true;
        }
        static ProfilingService()
        {
            profilers = new Dictionary <string, IProfiler> ();

            foreach (ProfilerCodon codon in AddinManager.GetExtensionNodes("/MonoDevelop/Profiling/Profilers"))
            {
                IProfiler prof = codon.Profiler;
                profilers.Add(prof.Identifier, prof);
            }

            snapshotHandler       = new ProfilingSnapshotEventHandler(HandleSnapshotTaken);
            stateHandler          = new ProfilerStateEventHandler(HandleStateChanged);
            snapshotFailedHandler = new EventHandler(HandleSnapshotFailed);

            string configFile = Path.Combine(PropertyService.Locations.Config, "MonoDevelop.Profiling.xml");

            profilingSnapshots = new ProfilingSnapshotCollection(configFile);
            profilingSnapshots.Load();
        }
Beispiel #3
0
        public override bool HasChildNodes(ITreeBuilder builder, object dataObject)
        {
            ProfilingSnapshotCollection collection = (ProfilingSnapshotCollection)dataObject;

            return(collection.Count > 0);
        }