public IDebugJob CreateJob(ConsoleLog console)
        {
            var process          = JobFactoryHelpers.TryResolveTargetProcess(RunningProcess, console);
            var debugTarget      = new DebugRunningProcess(process, DebugMode.Snapshot);
            var fullDumpFilePath = JobFactoryHelpers.ValidateDumpFilePathForOutput(GetDumpFilePath(process), OverwriteDumpFileIfExists);

            return(new DumpMemoryJob(debugTarget, fullDumpFilePath)
            {
                OverwriteDumpFileIfExists = OverwriteDumpFileIfExists
            });
        }
 public void Validate()
 {
     if (!RunningProcess.SuspendProcess)
     {
         throw new ErrorWithExitCodeException(1, "The -x switch is required in order to dump the contents of memory.")
               {
                   ShowUsage = true
               }
     }
     ;
     if (JobFactoryHelpers.TryResolveTargetProcessQuietly(RunningProcess, out var process))
     {
         JobFactoryHelpers.ValidateDumpFilePathForOutput(GetDumpFilePath(process), OverwriteDumpFileIfExists);
     }
 }