-
Notifications
You must be signed in to change notification settings - Fork 542
[RGen] Add a ArgumentForParameter method to create ArgumentSyntax from the parameter info. #23044
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
Conversation
…m the parameter info. This is a helper method that knows how to handle the ref kind and will create the correct argument syntax. This can later be used to create the arguments in a more elegant way.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #68530d6] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #68530d6] Build passed (Detect API changes) ✅Pipeline on Agent |
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 / commit.NET ( No breaking changes )✅ API diff vs stable.NET ( No breaking changes )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
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.
Pull Request Overview
This PR introduces a helper method in BindingSyntaxFactory to generate ArgumentSyntax objects from parameter information, including handling ref kinds, to simplify and standardize argument creation.
- Added ArgumentForParameter methods with overloads in BindingSyntaxFactory.cs
- Added tests verifying the syntax output for various ReferenceKind values in BindingSyntaxFactoryRuntimeTests.cs
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/BindingSyntaxFactoryRuntimeTests.cs | Added tests for ArgumentSyntax creation using different ReferenceKinds |
src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.cs | Introduced helper methods to create ArgumentSyntax based on parameter information |
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.
✅ [CI Build #68530d6] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #68530d6] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #68530d6] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #68530d6] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #68530d6] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
🚀 [CI Build #d8f4b53] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 115 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
This is a helper method that knows how to handle the ref kind and will create the correct argument syntax. This can later be used to create the arguments in a more elegant way.