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.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
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