From 57b2c8eb4505c449e9f0a9c672dccfe67c4a432c Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 14 Oct 2023 13:30:40 -0400 Subject: [PATCH] Simplify an `ObjectDisposedException` --- .../Components/Session/SessionController.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Session/SessionController.cs b/src/Tgstation.Server.Host/Components/Session/SessionController.cs index b6cfa31e50..b09d1ee7bf 100644 --- a/src/Tgstation.Server.Host/Components/Session/SessionController.cs +++ b/src/Tgstation.Server.Host/Components/Session/SessionController.cs @@ -600,11 +600,7 @@ namespace Tgstation.Server.Host.Components.Session /// /// Throws an if has been called. /// - void CheckDisposed() - { - if (disposed) - throw new ObjectDisposedException(nameof(SessionController)); - } + void CheckDisposed() => ObjectDisposedException.ThrowIf(disposed, this); /// /// Handle a set of bridge .