|Last Modified:||2015-10-15 19:39:17|
|Version Found In:||188.8.131.52|
anonymous added on 2015-10-15 15:45:42:
When upgrading to version 184.108.40.206 from version 220.127.116.11, previously working code using SQLiteFunction.RegisterFunction on the desktop Framework (x64 4.0) started to throw ArgumentException when manually registering SQLiteFunction types. It seems there has been a change of behavior which I have not found documented in the release notes (feel free to point it out though). From what I understand, I can no longer manually add types with SQLiteFunction.RegisterFunction because the SQLite framework would already have loaded them, but I cannot find a way to check if a type has already been registered before adding it. This proves to be an issue for me since I have some dynamic assembly loading and share some code base between the regular .NET Framework and the Compact Framework. I can use custom defines to avoid the problem, but I'd rather understand why it's not working anymore. Could you document the change which occurred in this function, and maybe provide a new helper function like SQLiteFunction.IsRegistered(Type type)?
mistachkin added on 2015-10-15 17:20:00:
The exception is caused by the changes from check-in [187e8cb03dd8b88f], which occurred between 18.104.22.168 and 22.214.171.124.
mistachkin added on 2015-10-15 17:24:01:
Previously, if you added the same type again, the most recent definition would "win". This was due to how the registered functions were tracked internally. The correct fix here is probably to restore the previous behavior as much as possible. The semantic change here was not intentional.
mistachkin added on 2015-10-15 19:19:43:
I've reproduced the issue locally. Working on fix.
mistachkin added on 2015-10-15 19:39:17:
Fixed on trunk via check-in [cb9c3d67aa3a32d7].