/// <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(); } }