public Task <int> Intercept(InterceptorExecutionDelegate next, InterceptOptions interceptOptions) { if (interceptOptions.skipCmd) { return(ExitCodes.Success); } var returnCode = next(); return(interceptOptions.useReturnCode.HasValue ? Task.FromResult(interceptOptions.useReturnCode.Value) : returnCode); }
public Task <int> Intercept(InterceptorExecutionDelegate next, InterceptOptions interceptOptions) { TestOutputs.Capture(interceptOptions); if (interceptOptions.skipCmd) { return(Task.FromResult(0)); } var returnCode = next(); return(interceptOptions.useReturnCode.HasValue ? Task.FromResult(interceptOptions.useReturnCode.Value) : returnCode); }