Table of Contents

Method That

Namespace
MongoDB.Driver.Core.Misc
Assembly
MongoDB.Driver.dll

That(bool, string)

Ensures that an assertion is true.

public static void That(bool assertion, string message)

Parameters

assertion bool

The assertion.

message string

The message to use with the exception that is thrown if the assertion is false.

That(bool, string, string)

Ensures that an assertion is true.

public static void That(bool assertion, string message, string paramName)

Parameters

assertion bool

The assertion.

message string

The message to use with the exception that is thrown if the assertion is false.

paramName string

The parameter name.

That<T>(T, Func<T, bool>, string, string)

Ensures that the value of a parameter meets an assertion.

public static T That<T>(T value, Func<T, bool> assertion, string paramName, string message)

Parameters

value T

The value of the parameter.

assertion Func<T, bool>

The assertion.

paramName string

The name of the parameter.

message string

The message to use with the exception that is thrown if the assertion is false.

Returns

T

The value of the parameter.

Type Parameters

T

Type type of the value.