Skip to content

Conversation

@rolfbjarne
Copy link
Member

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

Changes:

  • Enabled nullable reference types
  • Removed four [SupportedOSPlatform] attributes without version numbers from NSStreamSocksOptions class
  • Made fields in NSStreamSocksOptions nullable where appropriate (HostName, Username, Password)
  • Made return types nullable: indexer, SocksOptions, DataWrittenToMemoryStream, FileCurrentOffset, and out parameters in CreatePair methods
  • Replaced xml include directive with inline documentation from Item(Foundation.xml file
  • Removed Item(Foundation.xml file as it only contained the now-inlined documentation
  • Replaced "To be added." XML documentation with proper documentation for all methods and properties
  • Added see cref attributes throughout for better cross-referencing
  • Removed unnecessary whitespace in XML comments
  • Replaced manual null checks with ArgumentNullException.ThrowIfNull
  • Fixed typo in example code (Passowrd -> Password)
  • Improved formatting and consistency in XML documentation

Contributes towards #17285.

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

Changes:
- Enabled nullable reference types
- Removed four [SupportedOSPlatform] attributes without version numbers from NSStreamSocksOptions class
- Made fields in NSStreamSocksOptions nullable where appropriate (HostName, Username, Password)
- Made return types nullable: indexer, SocksOptions, DataWrittenToMemoryStream, FileCurrentOffset, and out parameters in CreatePair methods
- Replaced xml include directive with inline documentation from Item(Foundation.xml file
- Removed Item(Foundation.xml file as it only contained the now-inlined documentation
- Replaced "To be added." XML documentation with proper documentation for all methods and properties
- Added see cref attributes throughout for better cross-referencing
- Removed unnecessary whitespace in XML comments
- Replaced manual null checks with ArgumentNullException.ThrowIfNull
- Fixed typo in example code (Passowrd -> Password)
- Improved formatting and consistency in XML documentation

Contributes towards #17285.
@rolfbjarne rolfbjarne enabled auto-merge (squash) November 20, 2025 16:42
@rolfbjarne rolfbjarne requested a review from Copilot November 20, 2025 16:42
Copilot finished reviewing on behalf of rolfbjarne November 20, 2025 16:44
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 for NSStream.cs as part of the ongoing effort to enable nullability across the Foundation namespace. The changes focus on proper null safety annotations and documentation improvements.

  • Enabled #nullable enable and added nullable annotations to properties, fields, and method parameters where appropriate
  • Replaced manual null checks with ArgumentNullException.ThrowIfNull following established patterns
  • Improved XML documentation by inlining external documentation, adding proper cross-references, and fixing inconsistencies

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Foundation/NSStream.cs Enabled nullable reference types, added nullable annotations to properties/parameters/fields, replaced manual null checks with ArgumentNullException.ThrowIfNull, improved and inlined XML documentation, removed unnecessary SupportedOSPlatform attributes from NSStreamSocksOptions class, and fixed typo in example code
docs/api/Foundation.NSStream/Item(Foundation.xml Removed file as its documentation was inlined into NSStream.cs

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #ad777a0] 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
✅ 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. [attempt 2] Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 9 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 9 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: ad777a08a0a59af741896dc143efdbe492d4b98c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #ad777a0] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: ad777a08a0a59af741896dc143efdbe492d4b98c [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: ad777a08a0a59af741896dc143efdbe492d4b98c [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