Search Results for

    Show / Hide Table of Contents

    Class ConstraintBuilder.ConstraintStack

    ConstraintStack is a type-safe stack for holding Constraints

    Inheritance
    object
    ConstraintBuilder.ConstraintStack
    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.ConstraintStack

    Constructors

    View Source

    ConstraintStack(ConstraintBuilder)

    Initializes a new instance of the ConstraintBuilder.ConstraintStack class.

    Declaration
    public ConstraintStack(ConstraintBuilder builder)
    Parameters
    Type Name Description
    ConstraintBuilder builder

    The ConstraintBuilder using this stack.

    Properties

    View Source

    Empty

    Gets a value indicating whether this ConstraintBuilder.ConstraintStack is empty.

    Declaration
    public bool Empty { get; }
    Property Value
    Type Description
    bool

    true if empty; otherwise, false.

    Methods

    View Source

    Pop()

    Pops this topmost constraint from the stack. As a side effect, the constraint's Builder field is set to null.

    Declaration
    public IConstraint Pop()
    Returns
    Type Description
    IConstraint

    The topmost constraint on the stack

    View Source

    Push(IConstraint)

    Pushes the specified constraint. As a side effect, the constraint's Builder field is set to the ConstraintBuilder owning this stack.

    Declaration
    public void Push(IConstraint constraint)
    Parameters
    Type Name Description
    IConstraint constraint

    The constraint to put onto the 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