diff --git a/src/Test/Utilities/Desktop/ThrowingTraceListener.cs b/src/Test/Utilities/Desktop/ThrowingTraceListener.cs index dbf27fe475787b0b4c3fb27261f0e7353590d559..ec259c8001ab8e14df55e8b5f3274128b4844103 100644 --- a/src/Test/Utilities/Desktop/ThrowingTraceListener.cs +++ b/src/Test/Utilities/Desktop/ThrowingTraceListener.cs @@ -28,7 +28,7 @@ public override void Write(object o) { if (Debugger.IsLogging()) { - Debugger.Log(0, null, o != null ? o.ToString() : null); + Debugger.Log(0, null, o?.ToString()); } } @@ -36,7 +36,7 @@ public override void Write(object o, string category) { if (Debugger.IsLogging()) { - Debugger.Log(0, category, o != null ? o.ToString() : null); + Debugger.Log(0, category, o?.ToString()); } } @@ -60,7 +60,7 @@ public override void WriteLine(object o) { if (Debugger.IsLogging()) { - Debugger.Log(0, null, (o != null ? o.ToString() : null) + Environment.NewLine); + Debugger.Log(0, null, o?.ToString() + Environment.NewLine); } } @@ -68,7 +68,7 @@ public override void WriteLine(object o, string category) { if (Debugger.IsLogging()) { - Debugger.Log(0, category, (o != null ? o.ToString() : null) + Environment.NewLine); + Debugger.Log(0, category, o?.ToString() + Environment.NewLine); } }