RequiresStandardOutputMatches(String) Method

Definition

Assembly CliInvoke.Core.dll

A validation rule that checks whether the process result's standard output matches the supplied regular expression. Only meaningful when the result is a BufferedProcessResult; results that do not expose standard output text fail the rule.

public static Func<BufferedProcessResult, bool> RequiresStandardOutputMatches(string regex)

Parameters

regex
String

The regular expression pattern to evaluate against StandardOutput.

Returns

Func<BufferedProcessResult, Boolean>
A function that takes an instance of BufferedProcessResult as input and evaluates to true if the standard output matches the pattern; otherwise, false.