Search Results for

    Show / Hide Table of Contents

    Class ConstraintBuilder

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

    Inheritance
    object
    ConstraintBuilder
    Implements
    IResolveConstraint
    Inherited Members
    object.GetType()
    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 sealed class ConstraintBuilder : IResolveConstraint

    Constructors

    View Source

    ConstraintBuilder()

    Initializes a new instance of the ConstraintBuilder class.

    Declaration
    public ConstraintBuilder()

    Methods

    View Source

    Append(Constraint)

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

    Declaration
    public void Append(Constraint constraint)
    Parameters
    Type Name Description
    Constraint constraint

    The constraint to push.

    View Source

    Append(ConstraintOperator)

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

    Declaration
    public void Append(ConstraintOperator op)
    Parameters
    Type Name Description
    ConstraintOperator op

    The operator to push.

    View Source

    Replace(Constraint)

    Replaces the last pushed constraint with the specified constraint.

    Declaration
    public void Replace(Constraint constraint)
    Parameters
    Type Name Description
    Constraint constraint

    The constraint to replace the lastPushed with.

    View Source

    Resolve()

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

    Declaration
    public IConstraint Resolve()
    Returns
    Type Description
    IConstraint

    The resolved constraint

    Implements

    IResolveConstraint
    • 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