GuardConstraint

StockSharp.Xaml.Charting.Utility

Allows assertions to be built with the following syntax: Guard.Assert(123).IsLessThan(456);

Constructors

GuardConstraint
public GuardConstraint(IComparable value, string argName)
guardConstraint = GuardConstraint(value, argName)

Initializes a new instance of the GuardConstraint class.

value
The value.
argName
Name of the arg.

Methods

IsEqualTo
public void IsEqualTo(IComparable other, string otherArgName)
guardConstraint.IsEqualTo(other, otherArgName)

Asserts that the current value is equal to the specified other value

other
The other value.
otherArgName
Name of the other arg.
IsGreaterThan
public void IsGreaterThan(IComparable other)
guardConstraint.IsGreaterThan(other)

Asserts that the current value is greater to the specified other value

other
The other value.
IsGreaterThanOrEqualTo
public void IsGreaterThanOrEqualTo(IComparable other)
guardConstraint.IsGreaterThanOrEqualTo(other)

Asserts that the current value is greater than or equal to the specified other value

other
The other value.
IsLessThan
public void IsLessThan(IComparable other, string otherArgName)
guardConstraint.IsLessThan(other, otherArgName)

Asserts that the current value is less than the specified other value

other
The other value.
otherArgName
Name of the other arg.
IsLessThanOrEqualTo
public void IsLessThanOrEqualTo(IComparable other, string otherArgName)
guardConstraint.IsLessThanOrEqualTo(other, otherArgName)

Asserts that the current value is less than or equal to the specified other value

other
The other value.
otherArgName
Name of the other arg.
IsNotEqualTo
public void IsNotEqualTo(IComparable other, string otherArgName)
guardConstraint.IsNotEqualTo(other, otherArgName)

Asserts that the current value is not equal to the specified other value

other
The other value.
otherArgName
Name of the other arg.
IsNotEqualTo
public void IsNotEqualTo(IComparable other)
guardConstraint.IsNotEqualTo(other)

Asserts that the current value is not equal to the specified other value

other
The other value.