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

public class DebugRunner
{
    public static List<string> CaptureDebug(Action action)
    {
        var myTraceListener = new MyTraceListener();
        try
        {
            Debug.Listeners.Add(myTraceListener);
            action();
            Thread.Sleep(100);
        }
        finally
        {
            Debug.Listeners.Remove(myTraceListener);
        }
        return myTraceListener.Messages;
    }
    }

    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> move to Trace

<DFF> @@ -3,20 +3,20 @@
 using System.Diagnostics;
 using System.Threading;
 
-public class DebugRunner
+public class TraceRunner
 {
-    public static List<string> CaptureDebug(Action action)
+    public static List<string> Capture(Action action)
     {
         var myTraceListener = new MyTraceListener();
         try
         {
-            Debug.Listeners.Add(myTraceListener);
+            Trace.Listeners.Add(myTraceListener);
             action();
             Thread.Sleep(100);
         }
         finally
         {
-            Debug.Listeners.Remove(myTraceListener);
+            Trace.Listeners.Remove(myTraceListener);
         }
         return myTraceListener.Messages;
     }

move to Trace