public void Start(string program, params string[] arguments)
		{
			lock (lockObj) {
				if (wasStarted)
					throw new InvalidOperationException();
				
				profilerRunner = new ProfilerRunner(psi, true, writer);
				profilerRunner.RunFinished += delegate { hasExited = true; };
				runningProcess = profilerRunner.Run();
				wasStarted = true;
			}
		}
        public void Start(string program, params string[] arguments)
        {
            lock (lockObj) {
                if (wasStarted)
                {
                    throw new InvalidOperationException();
                }

                profilerRunner              = new ProfilerRunner(psi, true, writer);
                profilerRunner.RunFinished += delegate { hasExited = true; };
                runningProcess              = profilerRunner.Run();
                wasStarted = true;
            }
        }
        void Start(ProcessStartInfo startInfo, SelectedTests selectedTests)
        {
            LogCommandLine(startInfo);

            string path = selectedTests.Project.GetSessionFileName();

            LoggingService.Info("starting profiler...");

            runner = new ProfilerRunner(startInfo, true, new UnitTestWriter(new ProfilingDataSQLiteWriter(path), GetUnitTestNames(selectedTests).ToArray()));

            runner.RunFinished += delegate {
                WorkbenchSingleton.SafeThreadCall(() => FileService.OpenFile(path));
                AfterFinish(selectedTests, path);
            };

            testResultsMonitor.TestFinished += OnTestFinished;
            testResultsMonitor.Start();
            runner.Run();
        }
		void Start(ProcessStartInfo startInfo, SelectedTests selectedTests)
		{
			LogCommandLine(startInfo);
			
			string path = selectedTests.Project.GetSessionFileName();
			
			LoggingService.Info("starting profiler...");
			
			runner = new ProfilerRunner(startInfo, true, new UnitTestWriter(new ProfilingDataSQLiteWriter(path), GetUnitTestNames(selectedTests).ToArray()));
			
			runner.RunFinished += delegate {
				WorkbenchSingleton.SafeThreadCall(() => FileService.OpenFile(path));
				AfterFinish(selectedTests, path);
			};
			
			testResultsMonitor.TestFinished += OnTestFinished;
			testResultsMonitor.Start();
			runner.Run();
		}
		protected override void RunTests(UnitTestApplicationStartHelper helper)
		{
			TestRunnerCategory.AppendLine(helper.GetCommandLine());
			
			ProcessStartInfo startInfo = new ProcessStartInfo(helper.UnitTestApplication);
			
			string path = helper.Project.GetSessionFileName();
			
			startInfo.Arguments = helper.GetArguments();
			startInfo.WorkingDirectory = UnitTestApplicationStartHelper.UnitTestApplicationDirectory;
			LoggingService.Info("starting profiler...");
			
			runner = new ProfilerRunner(startInfo, true, new ProfilingDataSQLiteWriter(path, true, GetUnitTestNames(helper).ToArray()));
			
			runner.RunFinished += delegate {
				WorkbenchSingleton.SafeThreadCall(() => FileService.OpenFile(path));
				AfterFinish(helper, path);
			};
			
			runner.Run();
		}