protected override void Run(object ob) { profiler = (IProfiler)ob; Solution sol = IdeApp.ProjectOperations.CurrentSelectedSolution; if (sol != null) { IAsyncOperation op = IdeApp.ProjectOperations.Build(sol); op.Completed += delegate { if (op.Success) { ProfilingOperations.Profile(profiler, sol); } }; } else { doc = IdeApp.Workbench.ActiveDocument; if (doc != null) { IAsyncOperation op = doc.Build(); op.Completed += new OperationHandler(ExecuteFile); } } }
protected override void Run() { SelectProcessDialog dlg = new SelectProcessDialog(); if (dlg.Run() == (int)ResponseType.Ok) { IProfiler profiler = dlg.Profiler; Process process = dlg.Process; ProfilingOperations.ProfileProcess(profiler, process); } dlg.Destroy(); }
protected override void Run() { SelectExecutableDialog dlg = new SelectExecutableDialog(); if (dlg.Run() == (int)ResponseType.Ok) { IProfiler profiler = dlg.Profiler; string executable = dlg.Executable; string arguments = dlg.Arguments; string workingDir = Path.GetDirectoryName(executable); ProfilingOperations.ProfileApplication(profiler, executable, workingDir, arguments); } dlg.Destroy(); }