public override IProcessAsyncOperation Execute(ExecutionCommand command, IConsole console)
        {
            DummyProcessAsyncOperation dpao = new DummyProcessAsyncOperation(process);
            string profilerIdentifier, tempFile, snapshotFile;

            ProfilingService.GetProfilerInformation(process.Id, out profilerIdentifier, out tempFile);
            DotNetExecutionCommand dotcmd = (DotNetExecutionCommand)command;

            snapshotFile = profiler.GetSnapshotFileName(dotcmd.WorkingDirectory, tempFile);

            ProfilingService.ActiveProfiler = profiler;
            ProfilingContext profContext = new ProfilingContext(dpao, snapshotFile);

            profiler.Start(profContext);

            return(dpao);
        }
 private void ListProcessesAsync(object state)
 {
     foreach (Process proc in Process.GetProcesses())
     {
         string profiler;
         string filename;
         if (ProfilingService.GetProfilerInformation(proc.Id, out profiler, out filename))
         {
             IProfiler prof = ProfilingService.GetProfiler(profiler);
             if (prof != null && prof.IsSupported)
             {
                 DispatchService.GuiDispatch(delegate() {
                     store.AppendValues(proc.ProcessName, prof.Name, profiler, proc.Id.ToString(), proc);
                 });
             }
         }
     }
 }