Table of Contents

Class ConstraintBuilder.ConstraintStack

Namespace
NUnit.Framework.Constraints
Assembly
nunit.framework.dll

ConstraintStack is a type-safe stack for holding Constraints

public class ConstraintBuilder.ConstraintStack
Inheritance
ConstraintBuilder.ConstraintStack
Inherited Members

Constructors

ConstraintStack(ConstraintBuilder)

Initializes a new instance of the ConstraintStack class.

public ConstraintStack(ConstraintBuilder builder)

Parameters

builder ConstraintBuilder

The ConstraintBuilder using this stack.

Properties

Empty

Gets a value indicating whether this ConstraintStack is empty.

public bool Empty { get; }

Property Value

bool

true if empty; otherwise, false.

Methods

Pop()

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

public IConstraint Pop()

Returns

IConstraint

Push(IConstraint)

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

public void Push(IConstraint constraint)

Parameters

constraint IConstraint

The constraint.