[Generator] Move naming logic to its own class and add tests.#17562
Conversation
Naming could be problematic when generating code, move the logic out of the generator class to a helper class whose only job is to name classes and keep track of names.
|
dalexsoto
left a comment
There was a problem hiding this comment.
I like the new method names with the intent
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
||
| if (bta.Singleton && mi.GetParameters ().Length == 0 || mi.GetParameters ().Length == 1) | ||
| print ("public event EventHandler {0} {{", GetEventName (mi).CamelCase ()); | ||
| print ("public event EventHandler {0} {{", nomenclator.GetEventName (mi).CamelCase ()); |
There was a problem hiding this comment.
The other examples reference Nomenclator, so I believe it should be the same here?
| print ("public event EventHandler {0} {{", nomenclator.GetEventName (mi).CamelCase ()); | |
| print ("public event EventHandler {0} {{", Nomenclator.GetEventName (mi).CamelCase ()); |
There was a problem hiding this comment.
hmm good catch, they should all use the property!
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes)
NET (empty diffs)
✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)✅ Generator diffGenerator diff is empty Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻✅ All tests on macOS M1 - Mac Ventura (13.0) passed. Pipeline on Agent |
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 225 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Naming could be problematic when generating code, move the logic out of the generator class to a helper class whose only job is to name classes and keep track of names.