Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    ConstraintOperator
    BinaryOperator
    PrefixOperator
    SelfResolvingOperator
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework.Constraints
    Assembly: nunit.framework.dll
    Syntax
    public abstract class ConstraintOperator

    Constructors

    View Source

    ConstraintOperator()

    Declaration
    protected ConstraintOperator()

    Fields

    View Source

    left_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
    View Source

    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 Source

    LeftContext

    The syntax element preceding this operator

    Declaration
    public object? LeftContext { get; set; }
    Property Value
    Type Description
    object
    View Source

    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
    View Source

    RightContext

    The syntax element following this operator

    Declaration
    public object? RightContext { get; set; }
    Property Value
    Type Description
    object
    View Source

    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 Source

    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.

    Declaration
    public abstract void Reduce(ConstraintBuilder.ConstraintStack stack)
    Parameters
    Type Name Description
    ConstraintBuilder.ConstraintStack stack
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0