Guard Members

Project Mercury API

[This is preliminary documentation and is subject to change.]

The Guard type exposes the following members.

Methods

  NameDescription
ArgumentGreaterThan<(Of <(T>)>)
Performs a check against a method argument, and throws an ArgumentOutOfRangeException if it is greater than the specified threshold.
ArgumentLessThan<(Of <(T>)>)
Performs a check against a method argument, and throws an ArgumentOutOfRangeException if it is less than the specified threshold.
ArgumentNotFinite
Performs a check against a method argument, and throws a NotFiniteNumberException if it is not a finite number eg NaN, PositiveInfinity or NegetiveInfinity.
ArgumentNull
Performs a check against an argument, and throws a ArgumentNullException if it is null.
ArgumentNullOrEmpty
Performs a check against a string argument, and throws an ArgumentNullException if it is null or empty.
ArgumentOutOfRange<(Of <(T>)>)
Performs a check against a method argument, and throws an ArgumentOutOfRangeException if it is greater than the specified maximum value, or less than the specified minimum value.
IsFalse
Throws an InvalidOperationException if the specified expression evaluates to false.
IsTrue
Throws an InvalidOperationException if the specified expression evaluates to true.

See Also