Suppress bad finalizer warnings

This commit is contained in:
Cyberboss
2018-08-15 13:52:31 -04:00
parent 1c90c2a9dd
commit bbe112b741
2 changed files with 4 additions and 0 deletions
@@ -205,7 +205,9 @@ namespace Tgstation.Server.Host.Components.Watchdog
/// Finalize the <see cref="SessionController"/>
/// </summary>
/// <remarks>The finalizer dispose pattern is necessary so we don't accidentally leak the executable</remarks>
#pragma warning disable CA1821 // Remove empty Finalizers //TODO remove this when https://github.com/dotnet/roslyn-analyzers/issues/1241 is fixed
~SessionController() => Dispose(false);
#pragma warning restore CA1821 // Remove empty Finalizers
/// <inheritdoc />
public void Dispose()
@@ -43,7 +43,9 @@ namespace Tgstation.Server.Host.Core
/// <summary>
/// Finalize the <see cref="SemaphoreSlimContext"/>
/// </summary>
#pragma warning disable CA1821 // Remove empty Finalizers //TODO remove this when https://github.com/dotnet/roslyn-analyzers/issues/1241 is fixed
~SemaphoreSlimContext() => Dispose();
#pragma warning restore CA1821 // Remove empty Finalizers
/// <summary>
/// Release the lock on <see cref="lockedSemaphore"/>