コード例 #1
0
        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)*/));
        }
コード例 #2
0
		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)*/);
		}