-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Use string
for methods instead of IMethodSymbol
#549
Conversation
string
methods IMethodSymbol
string
for methods instead of IMethodSymbol
Codecov Report
@@ Coverage Diff @@
## main #549 +/- ##
==========================================
- Coverage 91.96% 91.67% -0.30%
==========================================
Files 147 158 +11
Lines 4656 5417 +761
Branches 588 687 +99
==========================================
+ Hits 4282 4966 +684
- Misses 254 305 +51
- Partials 120 146 +26
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
b5c6f43
to
ade2620
Compare
7e33cc1
to
fe4e1a9
Compare
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.
Looks good to me 😊 Ready to merge after a rebase.
fe4e1a9
to
24ae157
Compare
🎉 This PR is included in version 2.9.0-next.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Use
string
for methods instead ofIMethodSymbol
Description
Inspired by Sytem.Text.Json to use the known string of a method instead of looking it up via the compilation.
CollectionInfoBuilder
- usedSpecialType.System_Int32
instead oftypes.Get<int>()
EnumerableMappingBuilder
- use method string instead of retrieving the type and looking for a matching method, this has been done for ImmutableCollections, Collect methods andSelect
DictionaryMappingBuilder
ResolveImmutableCollectMethod
to useCollectionType
LinqDicitonaryMapping
Related to #530
Note that I've used a branch where #537 and #542 are added. This shouldn't be merged until after they are added.
By using a known method string it might be possible to remove the qualified type signature and use a using statement. See #507
Benchmarks
Saves 0.5MB with a small 5% speed boost
Original
Changed
Checklist