-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BGen] Simplify BindAs for smart enums. (#22222)
This changes does two things: 1. Adds a GetValue internal helper for non value backend smart enums. 2. Uses the GetValue functions as the builder for the NSArray. The new method (1) is only added to those smart enums that use a none value type backing field that looks like the following: ```csharp internal static ASAuthorizationProviderAuthorizationOperation GetValue (NativeHandle handle) { using var str = Runtime.GetNSObject<NSString> (handle); return GetValue (str); } ``` This is later used to retrieve the enum values from the handle in a BindAs decorated method/property. This is very similar to what we did in #22216 and has the same performance considerations (there is no performance change after C# 11 and later). --------- Co-authored-by: GitHub Actions Autoformatter <[email protected]>
- Loading branch information
1 parent
ed11d0e
commit 82d877a
Showing
6 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82d877a
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.
✅ [CI Build #82d877a] Build passed (Build packages) ✅
Pipeline on Agent
Hash: 82d877aadc1fb0ffd950c1a0f0043efae7cd9851 [CI build]
82d877a
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.
✅ [CI Build #82d877a] Build passed (Build macOS tests) ✅
Pipeline on Agent
Hash: 82d877aadc1fb0ffd950c1a0f0043efae7cd9851 [CI build]
82d877a
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.
💻 [CI Build #82d877a] Tests on macOS M1 - Mac Monterey (12) passed 💻
✅ All tests on macOS M1 - Mac Monterey (12) passed.
Pipeline on Agent
Hash: 82d877aadc1fb0ffd950c1a0f0043efae7cd9851 [CI build]
82d877a
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.
💻 [CI Build #82d877a] Tests on macOS X64 - Mac Sonoma (14) passed 💻
✅ All tests on macOS X64 - Mac Sonoma (14) passed.
Pipeline on Agent
Hash: 82d877aadc1fb0ffd950c1a0f0043efae7cd9851 [CI build]
82d877a
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.
💻 [CI Build #82d877a] Tests on macOS arm64 - Mac Sequoia (15) passed 💻
✅ All tests on macOS arm64 - Mac Sequoia (15) passed.
Pipeline on Agent
Hash: 82d877aadc1fb0ffd950c1a0f0043efae7cd9851 [CI build]
82d877a
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.
💻 [CI Build #82d877a] Tests on macOS M1 - Mac Ventura (13) passed 💻
✅ All tests on macOS M1 - Mac Ventura (13) passed.
Pipeline on Agent
Hash: 82d877aadc1fb0ffd950c1a0f0043efae7cd9851 [CI build]
82d877a
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.
🚀 [CI Build #82d877a] Test results 🚀
Test results
✅ All tests passed on VSTS: test results.
🎉 All 112 tests passed 🎉
Tests counts
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 8 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download
Pipeline on Agent
Hash: 82d877aadc1fb0ffd950c1a0f0043efae7cd9851 [CI build]