ConstraintExpression
ConstraintExpression represents a compound constraint in the
process of being constructed from a series of syntactic elements.
Individual elements are appended to the expression as they are
reorganized. When a constraint is appended, it is returned as the
value of the operation so that modifiers may be applied. However,
any partially built expression is attached to the constraint for
later resolution. When an operator is appended, the partial
expression is returned. If it's a self-resolving operator, then
a ResolvableConstraintExpression is returned.
The ConstraintBuilder holding the elements recognized so far
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding if all of them succeed.
Returns a constraint that tests whether an object graph is serializable in binary format.
Returns a new ConstraintExpression, which will apply the following
constraint to the Count property of the object being tested.
Returns a constraint that tests for empty
Returns a constraint that succeeds if the value
is a file or directory and it exists.
Returns a constraint that tests for False
Returns a new ConstraintExpression, which will apply the following
constraint to the InnerException property of the object being tested.
Returns a new ConstraintExpression, which will apply the following
constraint to the Length property of the object being tested.
Returns a new ConstraintExpression, which will apply the following
constraint to the Message property of the object being tested.
Returns a constraint that tests for NaN
Returns a constraint that tests for a negative value
Returns a ConstraintExpression that negates any
following constraint.
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding if all of them fail.
Returns a ConstraintExpression that negates any
following constraint.
Returns a constraint that tests for null
Returns a ItemsConstraintExpression, which will
apply the following constraint to a collection of length one, succeeding
only if exactly one of them succeeds.
Returns a constraint that tests whether a collection is ordered
Returns a constraint that tests for a positive value
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding if at least one of them succeeds.
Returns a constraint that tests for True
Returns a constraint that tests whether a collection
contains all unique items.
With is currently a NOP - reserved for future use.
Returns a constraint that tests whether an object graph is serializable in XML format.
Returns a constraint that tests if item is equal to zero
public ConstraintExpression()
Initializes a new instance of the ConstraintExpression class.
Initializes a new instance of the ConstraintExpression
class passing in a ConstraintBuilder, which may be pre-populated.
Returns a constraint that tests if an item is equal to any of parameters
Appends an operator to the expression and returns the
resulting expression itself.
Appends a self-resolving operator to the expression and
returns a new ResolvableConstraintExpression.
Appends a constraint to the expression and returns that
constraint, which is associated with the current state
of the expression being built. Note that the constraint
is not reduced at this time. For example, if there
is a NotOperator on the stack we don't reduce and
return a NotConstraint. The original constraint must
be returned because it may support modifiers that
are yet to be applied.
Returns a constraint that tests whether the actual value
is assignable from the type supplied as an argument.
Returns a constraint that tests whether the actual value
is assignable from the type supplied as an argument.
Returns a constraint that tests whether the actual value
is assignable from the type supplied as an argument.
Returns a constraint that tests whether the actual value
is assignable from the type supplied as an argument.
Returns a constraint that tests whether the
actual value is greater than or equal to the supplied argument
Returns a constraint that tests whether the
actual value is less than or equal to the supplied argument
Returns a new AttributeConstraint checking for the
presence of a particular attribute on an object.
Returns a new AttributeConstraint checking for the
presence of a particular attribute on an object.
Returns a new SomeItemsConstraint checking for the
presence of a particular object in the collection.
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.
Returns a new DictionaryContainsKeyConstraint checking for the
presence of a particular key in the Dictionary key collection.
Returns a new SomeItemsConstraint checking for the
presence of a particular object in the collection.
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.
Returns a constraint that succeeds if the actual
value contains the substring supplied as an argument.
Returns a new DictionaryContainsValueConstraint checking for the
presence of a particular value in the Dictionary value collection.
Returns a constraint that succeeds if the actual
value ends with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value ends with the substring supplied as an argument.
Returns a constraint that tests two items for equality
Returns a constraint that tests whether the actual value
is a collection containing the same elements as the
collection supplied as an argument.
Returns a ConstraintExpression, which will apply
the following constraint to all members of a collection,
succeeding only if a specified number of them succeed.
Returns a constraint that tests whether the
actual value is greater than the supplied argument
Returns a constraint that tests whether the
actual value is greater than or equal to the supplied argument
Returns a constraint that tests whether the actual value falls
inclusively within a specified range.
Returns a constraint that tests whether the actual value
is of the type supplied as an argument or a derived type.
Returns a constraint that tests whether the actual value
is of the type supplied as an argument or a derived type.
Returns a constraint that tests whether the
actual value is less than the supplied argument
Returns a constraint that tests whether the
actual value is less than or equal to the supplied argument
Returns a constraint that succeeds if the actual
value matches the regular expression supplied as an argument.
Returns the constraint provided as an argument - used to allow custom
custom constraints to easily participate in the syntax.
Returns the constraint provided as an argument - used to allow custom
custom constraints to easily participate in the syntax.
Returns a constraint that succeeds if the actual
value matches the regular expression supplied as an argument.
Returns a new SomeItemsConstraint checking for the
presence of a particular object in the collection.
Returns a new PropertyConstraintExpression, which will either
test for the existence of the named property on the object
being tested or apply any following constraint to that property.
Returns a constraint that tests that two references are the same object
Returns a constraint that tests whether the path provided
is the same as an expected path after canonicalization.
Returns a constraint that tests whether the path provided
is the same path or under an expected path after canonicalization.
Returns a constraint that succeeds if the actual
value starts with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value starts with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value contains the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value ends with the substring supplied as an argument.
Returns a constraint that succeeds if the actual
value matches the regular expression supplied as an argument.
Returns a constraint that succeeds if the actual
value starts with the substring supplied as an argument.
Returns a constraint that tests whether the path provided
is the a subpath of the expected path after canonicalization.
Returns a constraint that tests whether the actual value
is a subset of the collection supplied as an argument.
Returns a constraint that tests whether the actual value
is a superset of the collection supplied as an argument.
Returns a constraint that tests whether the actual
value is of the exact type supplied as an argument.
Returns a constraint that tests whether the actual
value is of the exact type supplied as an argument.