ThrowWhen Method
Definition
ThrowWhen(Action<ExceptionCondition<ArgumentException>>)
Validates and throws an ArgumentException (or a derived counterpart) from the specified delegate condition.
public static void ThrowWhen(Action<ExceptionCondition<ArgumentException>> condition)
Parameters
conditionAction<ExceptionCondition<ArgumentException>>The delegate that evaluates, creates and ultimately throws an ArgumentException (or a derived counterpart) from within a given scenario.
Exceptions
- ArgumentNullException
conditionis null.