From 7d2240463a8fe518e29362f4d9f48eb683a61cda Mon Sep 17 00:00:00 2001 From: Alex Zaytsev Date: Sun, 16 May 2021 00:17:16 +1200 Subject: [PATCH] Fix AmbiguousMatchException in ClearPool with FirebirdSql.Data.FirebirdClient 6.6.0 and above --- 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 da746c6b8e3..1f71e34dd7f 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."); } }