You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PDOEngine has private and internal mechanism to resolve drivers based on loaded assemblies, but assemblies and classes are hardcoded to predefined list of drivers.
I'd like to have an ability to add custom drivers to this list, or override existing drivers there to provide my own implementation.
Currently as a workaround we use this code on app startup:
var s_lazydrivers = typeof(PDOEngine).GetField("s_lazydrivers", BindingFlags.NonPublic | BindingFlags.Static);
var driver = new CustomPDOSqlServerDriver();
var drivers = new Dictionary<string, PDODriver>()
{
[driver.Name] = driver,
};
s_lazydrivers.SetValue(null, drivers);
Ideally I'd like to have something like void PDOEngine.RegisterDriver(PDODriver driver)
The text was updated successfully, but these errors were encountered:
thanks for the issue; you're right, it used to register the drivers dynamically, but for some reason, we hardcoded the list of drivers (probably because nobody was implementing their custom driver before).
We should implement the driver registration again.
PDOEngine
has private and internal mechanism to resolve drivers based on loaded assemblies, but assemblies and classes are hardcoded to predefined list of drivers.I'd like to have an ability to add custom drivers to this list, or override existing drivers there to provide my own implementation.
Currently as a workaround we use this code on app startup:
Ideally I'd like to have something like
void PDOEngine.RegisterDriver(PDODriver driver)
The text was updated successfully, but these errors were encountered: