public void Validate() { if (DumpedProcess.WasSpecified) { JobFactoryHelpers.ValidateDumpFilePathForInput(JobFactoryHelpers.GetDumpFilePath(DumpedProcess.DumpFile)); } }
private IDebugSessionTarget GetDebugTarget(ConsoleLog console) { if (RunningProcess.WasSpecified) { var process = JobFactoryHelpers.TryResolveTargetProcess(RunningProcess, console); return(new DebugRunningProcess(process, RunningProcess.SuspendProcess ? DebugMode.Snapshot : DebugMode.Observe)); } if (DumpedProcess.WasSpecified) { var fullDumpFilePath = JobFactoryHelpers.ValidateDumpFilePathForInput(JobFactoryHelpers.GetDumpFilePath(DumpedProcess.DumpFile)); return(new DebugMemoryDump(fullDumpFilePath)); } throw new ErrorWithExitCodeException(1, new ProcessNotSpecifiedException().Message) { ShowUsage = true }; }