internal static SandboxedProcessPipExecutionResult DetouringFailure(SandboxedProcessPipExecutionResult result) { return(new SandboxedProcessPipExecutionResult( SandboxedProcessPipExecutionStatus.FileAccessMonitoringFailed, observedFileAccesses: result.ObservedFileAccesses, sharedDynamicDirectoryWriteAccesses: result.SharedDynamicDirectoryWriteAccesses, encodedStandardError: result.EncodedStandardError, encodedStandardOutput: result.EncodedStandardOutput, numberOfWarnings: result.NumberOfWarnings, unexpectedFileAccesses: result.UnexpectedFileAccesses, primaryProcessTimes: result.PrimaryProcessTimes, jobAccountingInformation: result.JobAccountingInformation, numberOfProcessLaunchRetries: result.NumberOfProcessLaunchRetries, exitCode: result.ExitCode, sandboxPrepMs: result.SandboxPrepMs, processSandboxedProcessResultMs: result.ProcessSandboxedProcessResultMs, processStartTime: result.ProcessStartTimeMs, allReportedFileAccesses: result.AllReportedFileAccesses, detouringStatuses: result.DetouringStatuses, maxDetoursHeapSize: result.MaxDetoursHeapSizeInBytes)); }
internal static SandboxedProcessPipExecutionResult MismatchedMessageCountFailure(SandboxedProcessPipExecutionResult result) => new SandboxedProcessPipExecutionResult( SandboxedProcessPipExecutionStatus.MismatchedMessageCount, result.ObservedFileAccesses, result.SharedDynamicDirectoryWriteAccesses, result.EncodedStandardOutput, result.EncodedStandardError, result.NumberOfWarnings, result.UnexpectedFileAccesses, result.PrimaryProcessTimes, result.JobAccountingInformation, result.NumberOfProcessLaunchRetries, result.ExitCode, result.SandboxPrepMs, result.ProcessSandboxedProcessResultMs, result.ProcessStartTimeMs, result.AllReportedFileAccesses, result.DetouringStatuses, result.MaxDetoursHeapSizeInBytes, result.ContainerConfiguration, result.PipProperties);