public static IAsyncOperation ProfileProcess(IProfiler profiler, Process process) { if (IdeApp.ProjectOperations.CurrentRunOperation != null && !IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted) { return(IdeApp.ProjectOperations.CurrentRunOperation); } SwitchWorkbenchContext(ProfileWorkbenchContext); string workingDir = ProfilingService.GetProcessDirectory(process.Id); IExecutionHandler handler = profiler.GetProcessExecutionHandlerFactory(process); DotNetExecutionCommand cmd = new DotNetExecutionCommand(); cmd.WorkingDirectory = workingDir; return(handler.Execute(cmd, null /*context.ConsoleFactory.CreateConsole (true)*/)); }
public static IAsyncOperation ProfileProcess (IProfiler profiler, Process process) { if (IdeApp.ProjectOperations.CurrentRunOperation != null && !IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted) return IdeApp.ProjectOperations.CurrentRunOperation; SwitchWorkbenchContext (ProfileWorkbenchContext); string workingDir = ProfilingService.GetProcessDirectory (process.Id); IExecutionHandler handler = profiler.GetProcessExecutionHandlerFactory (process); DotNetExecutionCommand cmd = new DotNetExecutionCommand (); cmd.WorkingDirectory = workingDir; return handler.Execute (cmd, null /*context.ConsoleFactory.CreateConsole (true)*/); }