Click or drag to resize

Ensure Class

Represents methods that can be used to ensure that parameter values meet expected conditions.
Inheritance Hierarchy
System.Object
  MongoDB.Driver.Core.Misc.Ensure

Namespace:  MongoDB.Driver.Core.Misc
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public static class Ensure

The Ensure type exposes the following members.

Methods
  NameDescription
Public methodStatic memberHasValue<T>
Ensures that the value of a parameter is not null.
Public methodStatic memberIsBetween<T>
Ensures that the value of a parameter is between a minimum and a maximum value.
Public methodStatic memberIsEqualTo<T>
Ensures that the value of a parameter is equal to a comparand.
Public methodStatic memberIsGreaterThan<T>
Ensures that the value of a parameter is greater than a comparand.
Public methodStatic memberIsGreaterThanOrEqualTo<T>
Ensures that the value of a parameter is greater than or equal to a comparand.
Public methodStatic memberIsGreaterThanOrEqualToZero(Int32, String)
Ensures that the value of a parameter is greater than or equal to zero.
Public methodStatic memberIsGreaterThanOrEqualToZero(Int64, String)
Ensures that the value of a parameter is greater than or equal to zero.
Public methodStatic memberIsGreaterThanOrEqualToZero(TimeSpan, String)
Ensures that the value of a parameter is greater than or equal to zero.
Public methodStatic memberIsGreaterThanZero(Double, String)
Ensures that the value of a parameter is greater than zero.
Public methodStatic memberIsGreaterThanZero(Int32, String)
Ensures that the value of a parameter is greater than zero.
Public methodStatic memberIsGreaterThanZero(Int64, String)
Ensures that the value of a parameter is greater than zero.
Public methodStatic memberIsGreaterThanZero(TimeSpan, String)
Ensures that the value of a parameter is greater than zero.
Public methodStatic memberIsInfiniteOrGreaterThanOrEqualToZero
Ensures that the value of a parameter is infinite or greater than or equal to zero.
Public methodStatic memberIsInfiniteOrGreaterThanZero
Ensures that the value of a parameter is infinite or greater than zero.
Public methodStatic memberIsNotNull<T>
Ensures that the value of a parameter is not null.
Public methodStatic memberIsNotNullAndDoesNotContainAnyNulls<T>
Ensures that the value of a parameter is not null and does not contain any nulls.
Public methodStatic memberIsNotNullOrEmpty
Ensures that the value of a parameter is not null or empty.
Public methodStatic memberIsNull<T>
Ensures that the value of a parameter is null.
Public methodStatic memberIsNullOrBetween<T>
Ensures that the value of a parameter is null or is between a minimum and a maximum value.
Public methodStatic memberIsNullOrGreaterThanOrEqualToZero(Nullable<Int32>, String)
Ensures that the value of a parameter is null or greater than or equal to zero.
Public methodStatic memberIsNullOrGreaterThanOrEqualToZero(Nullable<Int64>, String)
Ensures that the value of a parameter is null or greater than or equal to zero.
Public methodStatic memberIsNullOrGreaterThanZero(Nullable<Int32>, String)
Ensures that the value of a parameter is null or greater than zero.
Public methodStatic memberIsNullOrGreaterThanZero(Nullable<Int64>, String)
Ensures that the value of a parameter is null or greater than zero.
Public methodStatic memberIsNullOrGreaterThanZero(Nullable<TimeSpan>, String)
Ensures that the value of a parameter is null or greater than zero.
Public methodStatic memberIsNullOrInfiniteOrGreaterThanOrEqualToZero
Ensures that the value of a parameter is null, or infinite, or greater than or equal to zero.
Public methodStatic memberIsNullOrNotEmpty
Ensures that the value of a parameter is null or not empty.
Public methodStatic memberIsNullOrValidTimeout
Ensures that the value of a parameter is null or a valid timeout.
Public methodStatic memberIsValidTimeout
Ensures that the value of a parameter is a valid timeout.
Public methodStatic memberThat(Boolean, String)
Ensures that an assertion is true.
Public methodStatic memberThat(Boolean, String, String)
Ensures that an assertion is true.
Public methodStatic memberThat<T>(T, Func<T, Boolean>, String, String)
Ensures that the value of a parameter meets an assertion.
Top
See Also