Skip to content

Conversation

@rolfbjarne
Copy link
Member

This is file 37 of 47 files with nullability disabled in Foundation.

Changes:

  • Enabled nullability
  • Fixed typos in file header ("palattable" -> "palatable", "INc" -> "Inc")
  • Added proper XML documentation for all public members, replacing "To be added" placeholders
  • Replaced include directives with inline documentation from NSLayoutConstraint.xml
  • Made return types nullable where appropriate (AsNumber, FirstAnchor, SecondAnchor)
  • Made view2 parameter nullable in Create method
  • Added ArgumentNullException.ThrowIfNull checks for format and viewsAndMetrics parameters
  • Removed all four [SupportedOSPlatform] attributes from FirstAnchor and SecondAnchor methods (none contained version numbers)
  • Added see cref attributes for better documentation cross-referencing
  • Fixed XML formatting and removed unnecessary whitespace

Contributes towards #17285.

This is file 37 of 47 files with nullability disabled in Foundation.

Changes:
- Enabled nullability
- Fixed typos in file header ("palattable" -> "palatable", "INc" -> "Inc")
- Added proper XML documentation for all public members, replacing "To be added" placeholders
- Replaced include directives with inline documentation from NSLayoutConstraint.xml
- Made return types nullable where appropriate (AsNumber, FirstAnchor, SecondAnchor)
- Made view2 parameter nullable in Create method
- Added ArgumentNullException.ThrowIfNull checks for format and viewsAndMetrics parameters
- Removed all four [SupportedOSPlatform] attributes from FirstAnchor and SecondAnchor methods (none contained version numbers)
- Added see cref attributes for better documentation cross-referencing
- Fixed XML formatting and removed unnecessary whitespace

Contributes towards #17285.
Copy link
Contributor

Copilot AI left a 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 enables nullable reference types in NSLayoutConstraint.cs, one of 47 files with nullability disabled in Foundation. The changes include fixing typos in the file header, adding comprehensive XML documentation to replace "To be added" placeholders, making return types and parameters nullable where appropriate based on the underlying binding definitions, adding defensive null checks, and removing unnecessary platform attributes.

Key changes:

  • Enabled #nullable enable and fixed nullability annotations for return types and parameters
  • Corrected typos in the file header ("palattable" → "palatable", "INc" → "Inc", "FromVisualLayout" → "FromVisualFormat")
  • Replaced XML include directives with inline documentation and improved documentation quality

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Foundation/NSLayoutConstraint.cs Enabled nullability, added null checks for format and viewsAndMetrics parameters, made return types nullable for AsNumber, FirstAnchor, and SecondAnchor methods, made view2 parameter nullable in Create method, replaced placeholder documentation with detailed XML docs, and removed unnecessary SupportedOSPlatform attributes
docs/api/UIKit/NSLayoutConstraint.xml Removed duplicated documentation entries that were inlined into the C# source file

@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

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

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

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rolfbjarne rolfbjarne enabled auto-merge (squash) December 15, 2025 09:03
@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #43da3aa] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #43da3aa] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

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

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #43da3aa] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #43da3aa] Tests on macOS arm64 - Mac Tahoe (26) passed 💻

All tests on macOS arm64 - Mac Tahoe (26) passed.

Pipeline on Agent
Hash: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [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 #43da3aa] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 128 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. [attempt 3] Html Report (VSDrops) Download
✅ generator: All 5 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. [attempt 4] Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 11 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: 43da3aaf17e0262fdebebb955d75d3ff17cdef50 [PR build]

@rolfbjarne rolfbjarne merged commit 86004a9 into main Dec 15, 2025
45 checks passed
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.

5 participants