Show / Hide Table of Contents

Class ExceptionCondition<TException>

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

Inheritance
Object
ExceptionCondition<TException>
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public class ExceptionCondition<TException>

    where TException : Exception
Type Parameters
Name Description
TException

The type of the Exception.

Methods

| Improve this Doc View Source

IsFalse(Func<Boolean>)

Indicates that the specified function delegate condition must evaluate false.

Declaration
public ExceptionHandler<TException> IsFalse(Func<bool> condition)
Parameters
Type Name Description
Func<Boolean> condition

The function delegate that determines if an Exception is thrown.

Returns
Type Description
ExceptionHandler<TException>

An ExceptionHandler<TException> with the specified condition.

Exceptions
Type Condition
ArgumentNullException

condition cannot be null.

| Improve this Doc View Source

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

Indicates that the specified function delegate condition must evaluate false.

Declaration
public ExceptionHandler<TException, TResult> IsFalse<TResult>(TesterFunc<TResult, bool> condition)
Parameters
Type Name Description
TesterFunc<TResult, Boolean> condition

The function delegate that determines if an Exception is thrown.

Returns
Type Description
ExceptionHandler<TException, TResult>

An ExceptionHandler<TException> with the specified condition.

Type Parameters
Name Description
TResult

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

Exceptions
Type Condition
ArgumentNullException

condition cannot be null.

| Improve this Doc View Source

IsTrue(Func<Boolean>)

Indicates that the specified function delegate condition must evaluate true.

Declaration
public ExceptionHandler<TException> IsTrue(Func<bool> condition)
Parameters
Type Name Description
Func<Boolean> condition

The function delegate that determines if an Exception is thrown.

Returns
Type Description
ExceptionHandler<TException>

An ExceptionHandler<TException> with the specified condition.

Exceptions
Type Condition
ArgumentNullException

condition cannot be null.

| Improve this Doc View Source

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

Indicates that the specified function delegate condition must evaluate true.

Declaration
public ExceptionHandler<TException, TResult> IsTrue<TResult>(TesterFunc<TResult, bool> condition)
Parameters
Type Name Description
TesterFunc<TResult, Boolean> condition

The function delegate that determines if an Exception is thrown.

Returns
Type Description
ExceptionHandler<TException, TResult>

An ExceptionHandler<TException> with the specified condition.

Type Parameters
Name Description
TResult

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

Exceptions
Type Condition
ArgumentNullException

condition cannot be null.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright 2008-2022 Geekle. All rights reserved. Code with passion and love; deploy with confidence. 👨‍💻️🔥❤️🚀😎
Generated by DocFX