Click or drag to resize

EnsureThatT Method (T, FuncT, Boolean, String, String)

Ensures that the value of a parameter meets an assertion.

Namespace:  MongoDB.Driver.Core.Misc
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.9.0+32b058abcdf2c7e8d9dd3a676d207b31897eee2e
Syntax
public static T That<T>(
	T value,
	Func<T, bool> assertion,
	string paramName,
	string message
)

Parameters

value
Type: T
The value of the parameter.
assertion
Type: SystemFuncT, Boolean
The assertion.
paramName
Type: SystemString
The name of the parameter.
message
Type: SystemString
The message to use with the exception that is thrown if the assertion is false.

Type Parameters

T
Type type of the value.

Return Value

Type: T
The value of the parameter.
See Also