Esempio n. 1
0
    public CreateProcessResult CreateProcess(string filename, string arguments, CreateProcessOptions options) {
      Logger.LogInfo("CreateProcess: {0} {1}", filename, arguments);

      // Attaching the debugger ensures the child process will die with the current process.
      var debuggerObject = new DebuggerObject();
      var processInformation = (options & CreateProcessOptions.AttachDebugger) != 0 ?
        debuggerObject.CreateProcess(() => CreateProcessImpl(filename, arguments, options)) :
        CreateProcessImpl(filename, arguments, options);

      Logger.LogInfo("CreateProcess: Creating CreateProcessResult instance.");
      return new CreateProcessResult(processInformation, debuggerObject);
    }
Esempio n. 2
0
 public CreateProcessResult(ProcessInformation processInformation, DebuggerObject debuggerObject) {
   _processInformation = processInformation;
   _debuggerObject = debuggerObject;
   _process = Process.GetProcessById(processInformation.ProcessId);
 }