Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9ba6441

Browse files
committedApr 16, 2024
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 7f75ea3 commit 9ba6441

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs

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

497497
public void Dispose()
498498
{
499-
_serviceHandler?.Dispose();
500-
_steps.Dispose();
499+
_serviceHandler.Dispose();
500+
_steps.Dispose();
501+
GC.SuppressFinalize(this);
501502
}
502503

503504
public class FakeMiddleware

0 commit comments

Comments
 (0)
Please sign in to comment.