Table of Contents

Class ExceptionCondition<TException>

Namespace
Cuemon
Assembly
Cuemon.Core.dll

Provides a fluent and generic way to setup a condition for raising an System.Exception.

public class ExceptionCondition<TException>
    where TException : Exception

Type Parameters

TException

The type of the System.Exception.

Inheritance
Object
ExceptionCondition<TException>

Methods

IsFalse(Func<Boolean>)

Indicates that the specified function delegate condition must evaluate false.

public ExceptionHandler<TException> IsFalse(Func<bool> condition)

Parameters

condition Func<Boolean>

The function delegate that determines if an System.Exception is thrown.

Returns

ExceptionHandler<TException>

An ExceptionHandler<TException> with the specified condition.

Exceptions

System.ArgumentNullException

condition cannot be null.

IsFalse<TResult>(TesterFunc<TResult, Boolean>)

Indicates that the specified function delegate condition must evaluate false.

public ExceptionHandler<TException, TResult> IsFalse<TResult>(TesterFunc<TResult, bool> condition)

Parameters

condition TesterFunc<TResult, Boolean>

The function delegate that determines if an System.Exception is thrown.

Returns

ExceptionHandler<TException, TResult>

An ExceptionHandler<TException> with the specified condition.

Type Parameters

TResult

The type of the out result value of the function delegate condition.

Exceptions

System.ArgumentNullException

condition cannot be null.

IsTrue(Func<Boolean>)

Indicates that the specified function delegate condition must evaluate true.

public ExceptionHandler<TException> IsTrue(Func<bool> condition)

Parameters

condition Func<Boolean>

The function delegate that determines if an System.Exception is thrown.

Returns

ExceptionHandler<TException>

An ExceptionHandler<TException> with the specified condition.

Exceptions

System.ArgumentNullException

condition cannot be null.

IsTrue<TResult>(TesterFunc<TResult, Boolean>)

Indicates that the specified function delegate condition must evaluate true.

public ExceptionHandler<TException, TResult> IsTrue<TResult>(TesterFunc<TResult, bool> condition)

Parameters

condition TesterFunc<TResult, Boolean>

The function delegate that determines if an System.Exception is thrown.

Returns

ExceptionHandler<TException, TResult>

An ExceptionHandler<TException> with the specified condition.

Type Parameters

TResult

The type of the out result value of the function delegate condition.

Exceptions

System.ArgumentNullException

condition cannot be null.