RequiresExitCode(Int32) Method

Definition

Assembly CliInvoke.Core.dll

A validation rule that checks whether the process result's exit code matches the specified value.

public static Func<TProcessResult, bool> RequiresExitCode(int exitCode)

Parameters

exitCode
Int32

The expected exit code that the process result must match for the validation to succeed.

Returns

Func<TProcessResult, Boolean>
A function that takes an instance of TProcessResult as input and evaluates to true if the exit code matches; otherwise, false.