Closed harrybellamy closed 5 years ago
Many Thanks for the PR.
There are a few things I think need a bit of tweaking if you don't mind.
#region
- it doesn't follow the current style of the codeget()
that mutates state I've updated the PR based off your suggestions - removed the new classes and added new logic to Configuration.cs
.
I have spotted a potential bug though that was already present for the converter lookup implementation - if a ValueConverter
is looked up for a type then a new one is added for the same type, the first implementation will still be returned from TryGetValueConverter
.
I can look at fixing this in this PR if desired.
Hi thanks for reporting.
I was thinking, the bug scenario fix is just as bad as the bug? Since for the type T
at some point one converter is used, then later, another converter is used without any warning or transparency.
regarding the cache class, try using a func as parameter for the ctor rather than a common interface. Perhaps in a new branch so as not to keep too much clutter around.
I've backed out the cache class and replaced with a simple dictionary lookup in Configuration.cs
.
Closing as I should've branched from master for this.
Added caching for the configuration in a generic class (see issue #37).