-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DictionarySource can evaluate IReadOnlyDictionary<TKey,TValue> #353
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
===================================
Coverage 96% 96%
===================================
Files 91 91
Lines 3198 3230 +32
===================================
+ Hits 3084 3115 +31
- Misses 114 115 +1
☔ View full report in Codecov by Sentry. |
@karljj1 From a performance perspective |
fcc83c5
to
abc2707
Compare
It looks like this new code will have an impact on performance so maybe it should be moved into its own source. It would be nice if it was part of the DictionarySource but it looks like dealing with IReadOnlyDictionary is not simple. |
@karljj1 Thanks for the comment. I fully agree. if (current is IReadOnlyDictionary<string, object?> reDict)
{
if (!reDict.TryGetValue(selector, out var val)) return false;
selectorInfo.Result = val;
return true;
} below the check for |
It feels like trying to handle an edge case here, Supporting |
@karljj1 Latest update - I agree to make it right or leave it:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. Much better to keep it optional :)
Closes #349