ConstraintExpressionBase Class

Definition

ConstraintExpressionBase is the abstract base class for the generated ConstraintExpression class, which represents a compound constraint in the process of being constructed from a series of syntactic elements. NOTE: ConstraintExpressionBase is aware of some of its derived classes, which is an apparent violation of encapsulation. Ideally, these classes would be a single class, but they must be separated in order to allow parts to be generated under .NET 1.x and to provide proper user feedback in syntactically aware IDEs.

public abstract class ConstraintExpressionBase
type ConstraintExpressionBase = class
Inheritance
ConstraintExpressionBase
Derived

Constructors

ConstraintExpressionBase()

Initializes a new instance of the ConstraintExpressionBase class.

ConstraintExpressionBase(ConstraintBuilder)

Initializes a new instance of the ConstraintExpressionBase class passing in a ConstraintBuilder, which may be pre-populated.

Fields

builder

The ConstraintBuilder holding the elements recognized so far

Methods

Append(Constraint)

Appends a constraint to the expression and returns that constraint, which is associated with the current state of the expression being built.

Append(ConstraintOperator)

Appends an operator to the expression and returns the resulting expression itself.

Append(SelfResolvingOperator)

Appends a self-resolving operator to the expression and returns a new ResolvableConstraintExpression.

ToString()

Returns a string representation of the expression as it currently stands. This should only be used for testing, since it has the side-effect of resolving the expression.

Applies to