Browse Source

Merge pull request #2555 from yyjdelete/assert

Use Trace.Listeners instead of Debug.Listeners
pull/2560/head
Siegfried Pammer 4 years ago committed by GitHub
parent
commit
a2470ffb72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ICSharpCode.Decompiler.Tests/TestTraceListener.cs
  2. 6
      ILSpy/ILSpyTraceListener.cs

4
ICSharpCode.Decompiler.Tests/TestTraceListener.cs

@ -28,13 +28,13 @@ namespace ICSharpCode.Decompiler.Tests @@ -28,13 +28,13 @@ namespace ICSharpCode.Decompiler.Tests
[OneTimeSetUp]
public void RunBeforeAnyTests()
{
Debug.Listeners.Insert(0, this);
Trace.Listeners.Insert(0, this);
}
[OneTimeTearDown]
public void RunAfterAnyTests()
{
Debug.Listeners.Remove(this);
Trace.Listeners.Remove(this);
}
public override void Fail(string message, string detailMessage)

6
ILSpy/ILSpyTraceListener.cs

@ -31,10 +31,8 @@ namespace ICSharpCode.ILSpy @@ -31,10 +31,8 @@ namespace ICSharpCode.ILSpy
[Conditional("DEBUG")]
public static void Install()
{
#if NET472
Debug.Listeners.Clear();
Debug.Listeners.Add(new ILSpyTraceListener());
#endif
Trace.Listeners.Clear();
Trace.Listeners.Add(new ILSpyTraceListener());
}
public ILSpyTraceListener()

Loading…
Cancel
Save