Class ConstraintOperator
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.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public abstract class ConstraintOperator
Constructors
View SourceConstraintOperator()
Declaration
protected ConstraintOperator()
Fields
View Sourceleft_precedence
The precedence value used when the operator is about to be pushed to the stack.
Declaration
protected int left_precedence
Field Value
Type | Description |
---|---|
int |
right_precedence
The precedence value used when the operator is on the top of the stack.
Declaration
protected int right_precedence
Field Value
Type | Description |
---|---|
int |
Properties
View SourceLeftContext
The syntax element preceding this operator
Declaration
public object? LeftContext { get; set; }
Property Value
Type | Description |
---|---|
object |
LeftPrecedence
The precedence value used when the operator is about to be pushed to the stack.
Declaration
public virtual int LeftPrecedence { get; }
Property Value
Type | Description |
---|---|
int |
RightContext
The syntax element following this operator
Declaration
public object? RightContext { get; set; }
Property Value
Type | Description |
---|---|
object |
RightPrecedence
The precedence value used when the operator is on the top of the stack.
Declaration
public virtual int RightPrecedence { get; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceReduce(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.
Declaration
public abstract void Reduce(ConstraintBuilder.ConstraintStack stack)
Parameters
Type | Name | Description |
---|---|---|
ConstraintBuilder.ConstraintStack | stack |