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(); }
public override bool HasChildNodes(ITreeBuilder builder, object dataObject) { ProfilingSnapshotCollection collection = (ProfilingSnapshotCollection)dataObject; return(collection.Count > 0); }