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
right_precedence
The precedence value used when the operator is on the top of the stack.
protected int right_precedence
Field Value
Properties
LeftContext
The syntax element preceding this operator
public object? LeftContext { get; set; }
Property Value
LeftPrecedence
The precedence value used when the operator is about to be pushed to the stack.
public virtual int LeftPrecedence { get; }
Property Value
RightContext
The syntax element following this operator
public object? RightContext { get; set; }
Property Value
RightPrecedence
The precedence value used when the operator is on the top of the stack.
public virtual int RightPrecedence { get; }
Property Value
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)