Class Ensure
Represents methods that can be used to ensure that parameter values meet expected conditions.
public static class Ensure
- Inheritance
-
Ensure
- Inherited Members
Methods
- HasValue<T>(T?, string)
Ensures that the value of a parameter is not null.
- IsBetween<T>(T, T, T, string)
Ensures that the value of a parameter is between a minimum and a maximum value.
- IsEqualTo<T>(T, T, string)
Ensures that the value of a parameter is equal to a comparand.
- IsGreaterThanOrEqualToZero(int, string)
Ensures that the value of a parameter is greater than or equal to zero.
- IsGreaterThanOrEqualToZero(long, string)
Ensures that the value of a parameter is greater than or equal to zero.
- IsGreaterThanOrEqualToZero(TimeSpan, string)
Ensures that the value of a parameter is greater than or equal to zero.
- IsGreaterThanOrEqualTo<T>(T, T, string)
Ensures that the value of a parameter is greater than or equal to a comparand.
- IsGreaterThanZero(double, string)
Ensures that the value of a parameter is greater than zero.
- IsGreaterThanZero(int, string)
Ensures that the value of a parameter is greater than zero.
- IsGreaterThanZero(long, string)
Ensures that the value of a parameter is greater than zero.
- IsGreaterThanZero(TimeSpan, string)
Ensures that the value of a parameter is greater than zero.
- IsGreaterThan<T>(T, T, string)
Ensures that the value of a parameter is greater than a comparand.
- IsInfiniteOrGreaterThanOrEqualToZero(TimeSpan, string)
Ensures that the value of a parameter is infinite or greater than or equal to zero.
- IsInfiniteOrGreaterThanZero(TimeSpan, string)
Ensures that the value of a parameter is infinite or greater than zero.
- IsNotNullAndDoesNotContainAnyNulls<T>(IEnumerable<T>, string)
Ensures that the value of a parameter is not null and does not contain any nulls.
- IsNotNullOrEmpty(string, string)
Ensures that the value of a parameter is not null or empty.
- IsNotNullOrEmpty<T>(IEnumerable<T>, string)
Ensures that the value of a parameter is not null or empty.
- IsNotNull<T>(T, string)
Ensures that the value of a parameter is not null.
- IsNullOrBetween<T>(T?, T, T, string)
Ensures that the value of a parameter is null or is between a minimum and a maximum value.
- IsNullOrGreaterThanOrEqualToZero(int?, string)
Ensures that the value of a parameter is null or greater than or equal to zero.
- IsNullOrGreaterThanOrEqualToZero(long?, string)
Ensures that the value of a parameter is null or greater than or equal to zero.
- IsNullOrGreaterThanZero(int?, string)
Ensures that the value of a parameter is null or greater than zero.
- IsNullOrGreaterThanZero(long?, string)
Ensures that the value of a parameter is null or greater than zero.
- IsNullOrGreaterThanZero(TimeSpan?, string)
Ensures that the value of a parameter is null or greater than zero.
- IsNullOrInfiniteOrGreaterThanOrEqualToZero(TimeSpan?, string)
Ensures that the value of a parameter is null, or infinite, or greater than or equal to zero.
- IsNullOrNotEmpty(string, string)
Ensures that the value of a parameter is null or not empty.
- IsNullOrValidTimeout(TimeSpan?, string)
Ensures that the value of a parameter is null or a valid timeout.
- IsNull<T>(T, string)
Ensures that the value of a parameter is null.
- IsValidTimeout(TimeSpan, string)
Ensures that the value of a parameter is a valid timeout.
- That(bool, string)
Ensures that an assertion is true.
- That(bool, string, string)
Ensures that an assertion is true.
- That<T>(T, Func<T, bool>, string, string)
Ensures that the value of a parameter meets an assertion.