Skip to content

Commit 2b8dd9b

Browse files
authored
Fix AmbiguousMatchException in ClearPool with FirebirdClient 6.6.0 and above (nhibernate#2758)
1 parent 6dba65d commit 2b8dd9b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/NHibernate.Test/NHibernate.Test.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<PackageReference Include="NUnit" Version="3.13.2" />
6464
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
6565
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
66-
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="6.3.0" />
66+
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="6.6.0" />
6767
<PackageReference Include="Npgsql" Version="4.0.3" />
6868
<PackageReference Include="MySql.Data" Version="8.0.22" />
6969
</ItemGroup>

src/NHibernate/Driver/FirebirdClientDriver.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ public void ClearPool(string connectionString)
160160
using (var clearConnection = CreateConnection())
161161
{
162162
var connectionType = clearConnection.GetType();
163-
_clearPool = connectionType.GetMethod("ClearPool") ?? throw new InvalidOperationException("Unable to resolve ClearPool method.");
164-
_clearAllPools = connectionType.GetMethod("ClearAllPools") ?? throw new InvalidOperationException("Unable to resolve ClearAllPools method.");
163+
_clearPool = connectionType.GetMethod("ClearPool", new[] { connectionType }) ?? throw new InvalidOperationException("Unable to resolve ClearPool method.");
164+
_clearAllPools = connectionType.GetMethod("ClearAllPools", Array.Empty<System.Type>()) ?? throw new InvalidOperationException("Unable to resolve ClearAllPools method.");
165165
}
166166
}
167167

0 commit comments

Comments
 (0)