Summary
ResolvableConstraintExpression is used to represent a compound
constraint being constructed at a point where the last operator
may either terminate the expression or may have additional
qualifying constraints added to it.
It is used, for example, for a Property element or for
an Exception element, either of which may be optionally
followed by constraints that apply to the property or
exception.
- Namespace
- TCLite
.Constraints - Interfaces
- Base Types
-
- object
- ConstraintExpression
graph BT
Type-->Base0["ConstraintExpression"]
click Base0 "/tc-lite/api/TCLite.Constraints/ConstraintExpression"
Base0-->Base1["object"]
Type-.->Interface0["IResolveConstraint"]
click Interface0 "/tc-lite/api/TCLite.Constraints/IResolveConstraint"
Type["ResolvableConstraintExpression"]
class Type type-node
Syntax
public class ResolvableConstraintExpression : ConstraintExpression, IResolveConstraint
Constructors
Name | Summary |
---|---|
Resolvable |
Create a new instance of ResolvableConstraintExpression, passing in a pre-populated ConstraintBuilder. |
Properties
Name | Value | Summary |
---|---|---|
And | ConstraintExpression |
Appends an And Operator to the expression
|
Builder | ConstraintBuilder |
The ConstraintBuilder associated with this expression
Inherited from ConstraintExpression
|
False | FalseConstraint |
Returns a constraint that tests for False
Inherited from ConstraintExpression
|
Negative | LessThanConstraint |
Returns a constraint that tests for a negative value
Inherited from ConstraintExpression
|
Null | NullConstraint |
Returns a constraint that tests for null
Inherited from ConstraintExpression
|
One | Items |
Returns a
ItemsConstraintExpression which will apply
the following constraint to only one member of the collection,
and fail if none or more than one match occurs.
Inherited from ConstraintExpression
|
Or | ConstraintExpression |
Appends an Or operator to the expression.
|
Positive | Greater |
Returns a constraint that tests for a positive value
Inherited from ConstraintExpression
|
True | TrueConstraint |
Returns a constraint that tests for True
Inherited from ConstraintExpression
|
Unique | Unique |
Returns a constraint that tests whether a collection
contains all unique items.
Inherited from ConstraintExpression
|
Zero | EqualConstraint |
Returns a constraint that tests if item is equal to zero
Inherited from ConstraintExpression
|
Methods
Name | Value | Summary |
---|---|---|
Append |
Constraint |
Appends a constraint to the expression and returns that
constraint, which is associated with the current state
of the expression being built.
Inherited from ConstraintExpression
|
Append |
ConstraintExpression |
Appends an operator to the expression and returns the
resulting expression itself.
Inherited from ConstraintExpression
|
Append |
Resolvable |
Appends a self-resolving operator to the expression and
returns a new ResolvableConstraintExpression.
Inherited from ConstraintExpression
|
AtLeast |
Greater |
Returns a constraint that tests whether the
actual value is greater than or equal to the suppled argument
Inherited from ConstraintExpression
|
AtMost |
Less |
Returns a constraint that tests whether the
actual value is less than or equal to the suppled argument
Inherited from ConstraintExpression
|
Contains |
ContainsConstraint |
Returns a new ContainsConstraint. This constraint
will, in turn, make use of the appropriate second-level
constraint, depending on the type of the actual argument.
This overload is only used if the item sought is a string,
since any other type implies that we are looking for a
collection member.
Inherited from ConstraintExpression
|
ContainsSubstring |
SubstringConstraint |
Returns a constraint that succeeds if the actual
value contains the substring supplied as an argument.
Inherited from ConstraintExpression
|
EndsWith |
EndsWithConstraint |
Returns a constraint that succeeds if the actual
value ends with the substring supplied as an argument.
Inherited from ConstraintExpression
|
EqualTo |
EqualConstraint |
Returns a constraint that tests two items for equality
Inherited from ConstraintExpression
|
EquivalentTo |
Collection |
Returns a constraint that tests whether the actual value
is a collection containing the same elements as the
collection supplied as an argument.
Inherited from ConstraintExpression
|
Exactly |
Items |
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding only if a specified number of them succeed.
Inherited from ConstraintExpression
|
GreaterThan |
Greater |
Returns a constraint that tests whether the
actual value is greater than the suppled argument
Inherited from ConstraintExpression
|
GreaterThanOrEqualTo |
Greater |
Returns a constraint that tests whether the
actual value is greater than or equal to the suppled argument
Inherited from ConstraintExpression
|
InRange |
RangeConstraint |
Returns a constraint that tests whether the actual value falls
within a specified range.
Inherited from ConstraintExpression
|
InstanceOf |
Instance |
Returns a constraint that tests whether the actual value
is of the type supplied as an argument or a derived type.
Inherited from ConstraintExpression
|
InstanceOf |
Instance |
Returns a constraint that tests whether the actual value
is of the type supplied as an argument or a derived type.
Inherited from ConstraintExpression
|
LessThan |
LessThanConstraint |
Returns a constraint that tests whether the
actual value is less than the suppled argument
Inherited from ConstraintExpression
|
LessThanOrEqualTo |
Less |
Returns a constraint that tests whether the
actual value is less than or equal to the suppled argument
Inherited from ConstraintExpression
|
Matches |
RegexConstraint |
Returns a constraint that succeeds if the actual
value matches the regular expression supplied as an argument.
Inherited from ConstraintExpression
|
Matches |
RegexConstraint |
Returns a constraint that succeeds if the actual
value matches the regular expression supplied as an argument.
Inherited from ConstraintExpression
|
SameAs |
SameAsConstraint |
Returns a constraint that tests that two references are the same object
Inherited from ConstraintExpression
|
StartsWith |
StartsWithConstraint |
Returns a constraint that succeeds if the actual
value starts with the substring supplied as an argument.
Inherited from ConstraintExpression
|
TypeOf |
ExactTypeConstraint |
Returns a constraint that tests whether the actual
value is of the exact type supplied as an argument.
Inherited from ConstraintExpression
|
TypeOf |
ExactTypeConstraint |
Returns a constraint that tests whether the actual
value is of the exact type supplied as an argument.
Inherited from ConstraintExpression
|