Преглед на файлове

Use ObjectDisposedException throw helper in UdpServerEntryPoint

Patrick Barron преди 1 година
родител
ревизия
57a2267304
променени са 1 файла, в които са добавени 1 реда и са изтрити 9 реда
  1. 1 9
      Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs

+ 1 - 9
Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs

@@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.EntryPoints
         /// <inheritdoc />
         public Task RunAsync()
         {
-            CheckDisposed();
+            ObjectDisposedException.ThrowIf(_disposed, this);
 
             if (!_configurationManager.GetNetworkConfiguration().AutoDiscovery)
             {
@@ -123,14 +123,6 @@ namespace Emby.Server.Implementations.EntryPoints
             return Task.CompletedTask;
         }
 
-        private void CheckDisposed()
-        {
-            if (_disposed)
-            {
-                throw new ObjectDisposedException(GetType().Name);
-            }
-        }
-
         /// <inheritdoc />
         public void Dispose()
         {