-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
feat: introduce experimental full nameof support #518
Conversation
Nice, what made you reconsider this? I'm not sure if it's possible, but is it possible to check for and warn the user when a qualified namespace is used? |
@TimothyMakkison this is just an experiment 😊 I think the current solution is really tedious DX, however I'm not yet convinced by this solution. I just wanted to poke around and see what it gets. It is still far from ready to be merged, there is still a lot to consider and work out. Not sure if it should relay on the @ prefix, how to handle the namespace thing, ..., ... Not sure yet if all of this can be worked out with the existing roslyn APIs. |
I thought the @ symbol is a pretty clever solution - it prevents accidental usage and indicates somethings different. The namespace thing isn't a big deal. Hopefully the error and documentation would inform people. |
Codecov Report
@@ Coverage Diff @@
## main #518 +/- ##
==========================================
- Coverage 90.90% 90.79% -0.12%
==========================================
Files 170 171 +1
Lines 5905 5997 +92
Branches 754 764 +10
==========================================
+ Hits 5368 5445 +77
- Misses 371 377 +6
- Partials 166 175 +9
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
🎉 This PR is included in version 3.1.0-next.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Nice, I'll be interested to see what people think of this 😅 Out of curiosity, why did you move the parsing logic into |
|
🎉 This PR is included in version 3.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
introduce experimental full nameof support
Description
Introduces experimental full nameof support.
See #401.
This would allow simpler
MapProperty
attributes for nested properties:[MapProperty(nameof(@A.B.C), nameof(@D.E.F)]
would be the same as[MapProperty(new[]{nameof(A.B), nameof(A.B.C)}, new[]{nameof(D.E), nameof(D.E.F)}]
.Checklist