コード例 #1
0
        /// <summary>
        /// Starts the command
        /// </summary>
        public override void Run()
        {
            IProject currentProj = ProjectService.CurrentProject;
            string   path        = currentProj.GetSessionFileName();

            Directory.CreateDirectory(Path.GetDirectoryName(path));

            IProfilingDataWriter writer = new ProfilingDataSQLiteWriter(path);
            ProfilerRunner       runner = ProfilerRunner.CreateRunner(writer);

            if (runner != null)
            {
                runner.RunFinished += delegate { currentProj.AddSessionToProject(path); };
                runner.Run();
            }
        }
コード例 #2
0
        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();
        }