[UIKit] Enable nullability and clean up UIDragDropSessionExtensions.#24609
Conversation
This is file 8 of 30 files with nullability disabled in UIKit. * Enable nullability (#nullable enable). * Use ArgumentNullException.ThrowIfNull() for parameter validation. * Add nullable annotation (T[]?) for completion handler parameter to reflect that the array can be null. * Improve XML documentation comments: remove 'To be added.' placeholders, add proper descriptions for all parameters/typeparams/returns, add 'see cref' references, remove extra whitespace, reorder elements (summary first), remove empty remarks elements. Contributes towards #17285.
There was a problem hiding this comment.
Pull request overview
This PR enables nullable reference types for the UIDragDropSessionExtensions class in UIKit and improves code quality through better documentation and null handling.
Changes:
- Enabled nullable reference types by adding
#nullable enabledirective - Added null argument validation using
ArgumentNullException.ThrowIfNull() - Enhanced XML documentation comments by removing placeholder text and adding detailed descriptions
Comments suppressed due to low confidence (1)
src/UIKit/UIDragDropSessionExtensions.cs:38
- The
GC.KeepAlive (v)call should be moved after thecompletion (arr)call on line 40. The purpose ofGC.KeepAliveis to ensure the object remains alive until that point in execution, but currently it's called before the completion handler which may still reference the object.
GC.KeepAlive (v);
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.
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.
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.
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.
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.
✅ [CI Build #f2c55c7] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #f2c55c7] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #f2c55c7] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #f2c55c7] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #f2c55c7] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #f2c55c7] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #f2c55c7] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #f2c55c7] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
🚀 [CI Build #f2c55c7] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 117 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
This is file 8 of 30 files with nullability disabled in UIKit.
Contributes towards #17285.