diff --git a/src/Adapter/MSTest.TestAdapter/Execution/LogMessageListener.cs b/src/Adapter/MSTest.TestAdapter/Execution/LogMessageListener.cs index 7e3dc95d39..b7a7c6a09c 100644 --- a/src/Adapter/MSTest.TestAdapter/Execution/LogMessageListener.cs +++ b/src/Adapter/MSTest.TestAdapter/Execution/LogMessageListener.cs @@ -87,11 +87,6 @@ public LogMessageListener(bool captureDebugTraces) } } - ~LogMessageListener() - { - Dispose(false); - } - /// /// Gets logger output. /// @@ -108,17 +103,9 @@ public LogMessageListener(bool captureDebugTraces) [SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Part of the public API")] public string? DebugTrace => s_redirectedDebugTrace?.ToString(); - public string? GetAndClearStandardOutput() - { - string? output = _redirectedStandardOutput.ToStringAndClear(); - return output; - } + public string? GetAndClearStandardOutput() => _redirectedStandardOutput.ToStringAndClear(); - public string? GetAndClearStandardError() - { - string? output = _redirectedStandardError.ToStringAndClear(); - return output; - } + public string? GetAndClearStandardError() => _redirectedStandardError.ToStringAndClear(); [SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Part of the public API")] public string? GetAndClearDebugTrace() @@ -126,13 +113,7 @@ public LogMessageListener(bool captureDebugTraces) public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - private void Dispose(bool disposing) - { - if (!disposing || _isDisposed) + if (_isDisposed) { return; } diff --git a/src/Adapter/MSTest.TestAdapter/PublicAPI/PublicAPI.Unshipped.txt b/src/Adapter/MSTest.TestAdapter/PublicAPI/PublicAPI.Unshipped.txt index 7dc5c58110..871e104b0f 100644 --- a/src/Adapter/MSTest.TestAdapter/PublicAPI/PublicAPI.Unshipped.txt +++ b/src/Adapter/MSTest.TestAdapter/PublicAPI/PublicAPI.Unshipped.txt @@ -1 +1,2 @@ #nullable enable +*REMOVED*Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.LogMessageListener.~LogMessageListener() -> void diff --git a/src/Adapter/MSTest.TestAdapter/PublicAPI/uap10.0.16299/PublicAPI.Unshipped.txt b/src/Adapter/MSTest.TestAdapter/PublicAPI/uap10.0.16299/PublicAPI.Unshipped.txt index 7dc5c58110..871e104b0f 100644 --- a/src/Adapter/MSTest.TestAdapter/PublicAPI/uap10.0.16299/PublicAPI.Unshipped.txt +++ b/src/Adapter/MSTest.TestAdapter/PublicAPI/uap10.0.16299/PublicAPI.Unshipped.txt @@ -1 +1,2 @@ #nullable enable +*REMOVED*Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.LogMessageListener.~LogMessageListener() -> void