<NME> TraceRunner.cs
<BEF> using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;

public static class TraceRunner
{
    static TraceRunner()
    {
        var myTraceListener = new MyTraceListener();
        Trace.Listeners.Add(myTraceListener);
    }

    public static List<string> Capture(Action action)
    {
        var list = new List<string>();
        MyTraceListener.Messages.Value = list;
        action();
        Thread.Sleep(100);
        return list;
    }
}
    public static async Task<List<string>> CaptureAsync(Func<Task> action)
    {
        var myTraceListener = new MyTraceListener();
        try
        {
            Trace.Listeners.Add(myTraceListener);
            await action();
            Thread.Sleep(100);
        }
        finally
        {
            Trace.Listeners.Remove(myTraceListener);
        }

        return myTraceListener.Messages;
    }
}
<MSG> Revert "try threaded"

This reverts commit 4d66ceef21bf6669959cab942a4f3ccc2836161f.

<DFF> @@ -3,20 +3,22 @@
 using System.Diagnostics;
 using System.Threading;
 
-public static class TraceRunner
+public class TraceRunner
 {
-    static TraceRunner()
+    public static List<string> Capture(Action action)
     {
         var myTraceListener = new MyTraceListener();
-        Trace.Listeners.Add(myTraceListener);
+        try
+        {
+            Trace.Listeners.Add(myTraceListener);
+            action();
+            Thread.Sleep(100);
+        }
+        finally
+        {
+            Trace.Listeners.Remove(myTraceListener);
+        }
+        return myTraceListener.Messages;
     }
 
-    public static List<string> Capture(Action action)
-    {
-        var list = new List<string>();
-        MyTraceListener.Messages.Value = list;
-        action();
-        Thread.Sleep(100);
-        return list;
-    }
 }
\ No newline at end of file

Revert "try threaded"