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
)
Public Shared Function That(Of T) (
value As T,
assertion As Func(Of T, Boolean),
paramName As String,
message As String
) As T
static member That :
value : 'T *
assertion : Func<'T, bool> *
paramName : string *
message : string -> 'T
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:
TThe value of the parameter.
See Also