Table of Contents

Class StackFilter

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

StackFilter class is used to remove internal NUnit entries from a stack trace so that the resulting trace provides better information about the test.

public class StackFilter
Inheritance
StackFilter
Inherited Members

Constructors

StackFilter()

Construct a stack filter instance

public StackFilter()

StackFilter(string)

Construct a stack filter instance

public StackFilter(string topOfStackPattern)

Parameters

topOfStackPattern string

Regex pattern used to delete lines from the top of the stack

StackFilter(string?, string?)

Construct a stack filter instance

public StackFilter(string? topOfStackPattern, string? bottomOfStackPattern)

Parameters

topOfStackPattern string

Regex pattern used to delete lines from the top of the stack

bottomOfStackPattern string

Regex pattern used to delete lines from the bottom of the stack

Fields

DefaultFilter

Single instance of our default filter

public static StackFilter DefaultFilter

Field Value

StackFilter

Methods

Filter(string?)

Filters a raw stack trace and returns the result.

public string? Filter(string? rawTrace)

Parameters

rawTrace string

The original stack trace

Returns

string

A filtered stack trace