浏览代码

nameof instead of GetType().Name

Bond_009 2 年之前
父节点
当前提交
8e1f0d53c1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Emby.Server.Implementations/Data/ConnectionPool.cs

+ 2 - 2
Emby.Server.Implementations/Data/ConnectionPool.cs

@@ -38,9 +38,9 @@ public sealed class ConnectionPool : IDisposable
 
         return new ManagedConnection(_connections.Take(), this);
 
-        void ThrowObjectDisposedException()
+        static void ThrowObjectDisposedException()
         {
-            throw new ObjectDisposedException(GetType().Name);
+            throw new ObjectDisposedException(nameof(ConnectionPool));
         }
     }