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.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
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