Table of Contents

Class ConstraintBuilder

Namespace
NUnit.Framework.Constraints
Assembly
nunit.framework.dll

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 reognized. a ConstraintStack holds input constraints as well as the results of each operator applied.

public class ConstraintBuilder : IResolveConstraint
Inheritance
ConstraintBuilder
Implements
Inherited Members

Constructors

ConstraintBuilder()

Initializes a new instance of the ConstraintBuilder class.

public ConstraintBuilder()

Methods

Append(Constraint)

Appends the specified constraint to the expresson by pushing it on the constraint stack.

public void Append(Constraint constraint)

Parameters

constraint Constraint

The constraint to push.

Append(ConstraintOperator)

Appends the specified operator to the expression by first reducing the operator stack and then pushing the new operator on the stack.

public void Append(ConstraintOperator op)

Parameters

op ConstraintOperator

The operator to push.

Resolve()

Resolves this instance, returning a Constraint. If the Builder is not currently in a resolvable state, an exception is thrown.

public IConstraint Resolve()

Returns

IConstraint

The resolved constraint