Add thorough tests for partially supported NRBF types
This PR adds comprehensive tests for Hashtable serialization handling in CoreNrbfSerializer to ensure we're properly handling instances with unsupported content and not losing data over fields we don't currently handle (like the comparer).
The tests include:
- Verification that
CoreNrbfSerializer.IsFullySupportedType()correctly returnsfalseforHashtabletypes - Tests that standard
Hashtableobjects can be properly serialized and deserialized - Tests that
Hashtableobjects with custom comparers:- Can be serialized but not deserialized by
CoreNrbfSerializer - Retain all their data including the comparer when roundtripped through serialization
- Can be serialized but not deserialized by
- Tests that
Hashtableobjects with custom hash code providers:- Can be serialized but not deserialized by
CoreNrbfSerializer - Preserve their hash code provider information when roundtripped
- Can be serialized but not deserialized by
These tests are important to ensure that while we may not fully handle all Hashtable configurations through CoreNrbfSerializer, we at least don't lose data when these objects pass through serialization, maintaining compatibility with existing functionality.
Fixes #12927.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
pkgs.dev.azure.com
- Triggering command:
dotnet restore src/System.Private.Windows.Core/tests/System.Private.Windows.Core.Tests/System.Private.Windows.Core.Tests.csproj(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to my firewall allow list
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Do not update the global.json.
I've reverted the changes to global.json in commit d182b49. The file is now restored to its original state with the correct SDK version.
This code does not compile. Please fix the noted errors.
Fixed the compilation issues in commit 7973629 by:
- Adding CS0618 suppression for the entire class with explanatory comment
- Using the correct Hashtable constructor overload that takes both IHashCodeProvider and IComparer (passing null when only the provider is needed)