From 8457c32a01cd456cc019c4049777fe0b3da8eb6a Mon Sep 17 00:00:00 2001 From: Alex Zaytsev Date: Sun, 16 May 2021 05:47:28 +0300 Subject: [PATCH] Fix AmbiguousMatchException in ClearPool with FirebirdClient 6.6.0 and above (#2758) (cherry picked from commit 2b8dd9be20e3f35a4e609f1f41e6333bcf36501e) --- src/NHibernate.Test/NHibernate.Test.csproj | 2 +- src/NHibernate/Driver/FirebirdClientDriver.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NHibernate.Test/NHibernate.Test.csproj b/src/NHibernate.Test/NHibernate.Test.csproj index 061199e776f..84d9e58e8ef 100644 --- a/src/NHibernate.Test/NHibernate.Test.csproj +++ b/src/NHibernate.Test/NHibernate.Test.csproj @@ -63,7 +63,7 @@ - + diff --git a/src/NHibernate/Driver/FirebirdClientDriver.cs b/src/NHibernate/Driver/FirebirdClientDriver.cs index 2cfa6bd448d..e2859880adb 100644 --- a/src/NHibernate/Driver/FirebirdClientDriver.cs +++ b/src/NHibernate/Driver/FirebirdClientDriver.cs @@ -160,8 +160,8 @@ public void ClearPool(string connectionString) using (var clearConnection = CreateConnection()) { var connectionType = clearConnection.GetType(); - _clearPool = connectionType.GetMethod("ClearPool") ?? throw new InvalidOperationException("Unable to resolve ClearPool method."); - _clearAllPools = connectionType.GetMethod("ClearAllPools") ?? throw new InvalidOperationException("Unable to resolve ClearAllPools method."); + _clearPool = connectionType.GetMethod("ClearPool", new[] { connectionType }) ?? throw new InvalidOperationException("Unable to resolve ClearPool method."); + _clearAllPools = connectionType.GetMethod("ClearAllPools", Array.Empty()) ?? throw new InvalidOperationException("Unable to resolve ClearAllPools method."); } }