2
// Copyright (C) 2002. James W. Newkirk, Michael C. Two, Alexei A. Vorontsov. All Rights Reserved.
10
/// Summary description for StackTraceFilter.
12
public class StackTraceFilter
14
public static string Filter(string stack)
16
if(stack == null) return null;
17
StringWriter sw = new StringWriter();
18
StringReader sr = new StringReader(stack);
23
while ((line = sr.ReadLine()) != null)
25
if (!FilterLine(line))
36
static bool FilterLine(string line)
38
string[] patterns = new string[]
40
"Nunit.Core.TestCase",
41
"Nunit.Core.ExpectedExceptionTestCase",
42
"Nunit.Core.TemplateTestCase",
43
"Nunit.Core.TestResult",
44
"Nunit.Core.TestSuite",
45
"Nunit.Framework.Assertion"
48
for (int i = 0; i < patterns.Length; i++)
50
if (line.IndexOf(patterns[i]) > 0)