Skip to content

Conversation

mandel-macaque
Copy link
Member

Ensure that the correct named parameters are used when using the Category flag. This will raise the following:

  1. Name contains spaces (error).
  2. Category type is not a INativeObject (error).
  3. DefaultCtorVisibility is ignored (warning).
  4. ErrorDomain is ignored (warning).
  5. IntPtrCtorVisibility is ignored (warning).
  6. ModelName is ignored (warning).
  7. StringCtorVisibility is ignored (warning).

We updated the way the BingdingTypeAttribute is parsed to get all the data and use that data to decide if named parameters were used that are not supported.

mandel-macaque and others added 2 commits September 11, 2025 11:38
Ensure that the correct named parameters are used when using the
Category flag. This will raise the following:

1. Name contains spaces (error).
2. Category type is not a INativeObject (error).
3. DefaultCtorVisibility is ignored (warning).
4. ErrorDomain is ignored (warning).
5. IntPtrCtorVisibility is ignored (warning).
6. ModelName is ignored (warning).
7. StringCtorVisibility is ignored (warning).

We updated the way the BingdingTypeAttribute is parsed to get all the
data and use that data to decide if named parameters were used that are
not supported.
// validate the name if specified
if (data.Name is not null) {
// validate that we do not have any whitespaces in the name
if (string.IsNullOrWhiteSpace (data.Name) || data.Name.Contains (' ')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to use 'char.IsWhiteSpace' to check for whitespace instead of just checking spaces

}",
"RBI0049",
DiagnosticSeverity.Error,
"Category 'TestClass' type 'TestNamespace.MyClass' does not implement INativeObject"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can make it stricter, the category must be for NSObject, not INativeObject.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Member

@dalexsoto dalexsoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After Rolf's 👍

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #7ce4c2e] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #7ce4c2e] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

✅ API diff vs stable

.NET ( No breaking changes )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #7ce4c2e] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7ce4c2e] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7ce4c2e] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7ce4c2e] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7ce4c2e] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #7ce4c2e] 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
✅ 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
✅ windows: All 3 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: 7ce4c2edbd67317d36277e5920aaa9162fe05213 [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants