Skip to content

Conversation

@nscheibe
Copy link
Member

@nscheibe nscheibe commented Jul 8, 2025

This pull request includes several updates to dependencies, a migration to .NET 8.0, and refactoring of MongoDB-related serializers. The most significant changes involve upgrading package versions, removing support for .NET 6.0, and improving the structure and functionality of the TypeObjectSerializer class.

Dependency Updates:

  • Updated multiple package versions in Directory.Packages.props, including Moq (4.16.1 → 4.20.72), Snapshooter.Xunit (0.13.0 → 0.14.1), and Microsoft.SourceLink.GitHub (1.1.1 → 8.0.0), among others.
  • Updated Microsoft.VisualStudio.Azure.Containers.Tools.Targets (1.17.0 → 1.21.0) and NSwag.AspNetCore (14.0.8 → 14.3.0) in samples/Directory.Packages.props.

Migration to .NET 8.0:

  • Changed the target framework for multiple projects, including Migration.csproj and Migration.Tests.csproj, to net8.0 and removed support for net6.0. [1] [2] [3] [4]
  • Removed IsExternalInit.cs conditionally included for net6.0 in Context.Tests.csproj.

MongoDB Serializer Refactoring:

  • Refactored TypeObjectSerializer to expose an ObjectSerializer property, replacing the private _objectSerializer field. Updated methods to use this property for serialization and equality checks. [1] [2]
  • Modified TryRegisterObjectSerializer in MongoDatabaseBuilder to register the ObjectSerializer from TypeObjectSerializer.
  • Updated tests in MongoDatabaseBuilderTests.cs to assert against ObjectSerializer instead of TypeObjectSerializer. [1] [2] [3]

Codebase Simplification:

  • Introduced System.Collections.Immutable to convert convention names to immutable lists in RegisterConventions for better immutability and safety.
  • Removed unused using directives in MongoDatabaseBuilderTests.cs.

These changes improve compatibility with .NET 8.0, enhance dependency management, and refine the MongoDB serialization mechanism for better maintainability and performance.

Copy link
Member Author

@nscheibe nscheibe left a comment

Choose a reason for hiding this comment

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

All looks right

@nscheibe nscheibe requested a review from bejto July 8, 2025 14:32
Copy link
Member

@bejto bejto left a comment

Choose a reason for hiding this comment

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

appruft

@nscheibe nscheibe merged commit f97922a into master Jul 8, 2025
2 checks passed
@nscheibe nscheibe deleted the nors/updateMongodriver3-4-0 branch July 8, 2025 14:36
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.

3 participants