Пример #1
0
        public int EnumProcesses(out IEnumDebugProcesses2 processesEnum)
        {
            List <IDebugProcess2> processes;

            try
            {
                var results = GetProcessList(_processListRequestFactory.Create());
                processes =
                    results
                    .Select(r => _debugProcessFactory.Create(this, r.Pid, r.Title, r.Command))
                    .ToList();
            }
            catch (ProcessException e)
            {
                Trace.WriteLine("ProcessException:" + e);
                _dialogUtil.ShowError(ErrorStrings.ErrorQueryingGameletProcesses(e.Message),
                                      e.ToString());
                processes = new List <IDebugProcess2>();
            }

            processesEnum = new ProcessesEnum(processes.ToArray());
            return(VSConstants.S_OK);
        }