Skip to content

Commit 81d796c

Browse files
committed
CA1816 Change Dispose() to call GC.SuppressFinalize(object). This will prevent derived types that introduce a finalizer from needing to re-implement 'IDisposable' to call it.
1 parent dd6ac7d commit 81d796c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,9 @@ private void GivenThereIsAServiceRunningOn(string url, int statusCode, string ba
465465

466466
public void Dispose()
467467
{
468-
_serviceHandler?.Dispose();
469-
_steps.Dispose();
468+
_serviceHandler.Dispose();
469+
_steps.Dispose();
470+
GC.SuppressFinalize(this);
470471
}
471472

472473
public class FakeMiddleware

0 commit comments

Comments
 (0)