Table of Contents

Class ConstraintOperator

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

The ConstraintOperator class is used internally by a ConstraintBuilder to represent an operator that modifies or combines constraints.

Constraint operators use left and right precedence _values to determine whether the top operator on the stack should be reduced before pushing a new operator.

public abstract class ConstraintOperator
Inheritance
ConstraintOperator
Derived
Inherited Members

Constructors

ConstraintOperator()

protected ConstraintOperator()

Fields

left_precedence

The precedence value used when the operator is about to be pushed to the stack.

protected int left_precedence

Field Value

int

right_precedence

The precedence value used when the operator is on the top of the stack.

protected int right_precedence

Field Value

int

Properties

LeftContext

The syntax element preceding this operator

public object LeftContext { get; set; }

Property Value

object

LeftPrecedence

The precedence value used when the operator is about to be pushed to the stack.

public virtual int LeftPrecedence { get; }

Property Value

int

RightContext

The syntax element folowing this operator

public object RightContext { get; set; }

Property Value

object

RightPrecedence

The precedence value used when the operator is on the top of the stack.

public virtual int RightPrecedence { get; }

Property Value

int

Methods

Reduce(ConstraintStack)

Reduce produces a constraint from the operator and any arguments. It takes the arguments from the constraint stack and pushes the resulting constraint on it.

public abstract void Reduce(ConstraintBuilder.ConstraintStack stack)

Parameters

stack ConstraintBuilder.ConstraintStack