ConstraintBuilder Class

Summary

ConstraintBuilder maintains the stacks that are used in processing a ConstraintExpression. An OperatorStack is used to hold operators that are waiting for their operands to be recognized. a ConstraintStack holds input constraints as well as the results of each operator applied.
Namespace
TCLite.Constraints
Interfaces
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["IResolveConstraint"] click Interface0 "/tc-lite/api/TCLite.Constraints/IResolveConstraint" Type["ConstraintBuilder"] class Type type-node

Syntax

public class ConstraintBuilder : IResolveConstraint

Constructors

Name Summary
ConstraintBuilder() Initializes a new instance of the ConstraintExpression class.

Properties

Name Value Summary
IsResolvable bool
Gets a value indicating whether the expression under construction is currently resolvable, allowing the Resolve() method to be called.

Methods

Name Value Summary
Append(Constraint) Constraint
Appends the specified constraint to the expresson by pushing it on the constraint stack.
Append(ConstraintOperator) void
Appends the specified operator to the expression by first reducing the operator stack and then pushing the new operator on the stack.
Resolve() IConstraint
Resolves this instance, returning a Constraint. If the builder is not currently in a resolvable state, an exception is thrown.