Class StackFilter
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
stringRegex 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
stringRegex pattern used to delete lines from the top of the stack
bottomOfStackPattern
stringRegex 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
Methods
Filter(string?)
Filters a raw stack trace and returns the result.
public string? Filter(string? rawTrace)
Parameters
rawTrace
stringThe original stack trace
Returns
- string
A filtered stack trace