public static IDisposable Create(Action <string> write) { var listener = new AnonymousTraceListener(write); Trace.Listeners.Add(listener); return(Disposable.Create(() => Trace.Listeners.Remove(listener))); }
public static IDisposable Create(Action<string> write) { var listener = new AnonymousTraceListener(write); Trace.Listeners.Add(listener); return Disposable.Create(() => Trace.Listeners.Remove(listener)); }