Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCSP-43829 - Disposable IMongoClient #241

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The 3.0 driver release includes the following new features:
`mongocsharpdriver <https://www.nuget.org/packages/mongocsharpdriver/#readme-body-tab>`__ NuGet package,
which implements the v1.x driver API in driver versions 2.x. This package will no
longer receive updates.

- Adds the ``MongoClientSettings.TranslationOptions`` connection option, which specifies
options for translating LINQ queries to the Query API. See :ref:`csharp-connection-options`
for more information.
Expand All @@ -59,6 +60,16 @@ The 3.0 driver release includes the following new features:
`Half Struct <https://learn.microsoft.com/en-us/dotnet/api/system.half?view=net-8.0>`__
API reference page on MSDN.

- The ``IMongoClient`` interface inherits the ``IDisposable`` interface. As a result, the
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tech reviewer: I don't see this as a breaking change, but correct me if I'm wrong

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this is not a breaking change.
We should mention that Dispose disposes the underlying cluster and connections to the server.
Also this is an experimental feature, so we should document it as such.

``MongoClient`` class and other classes that implement the ``IMongoClient`` interface
contain a ``Dispose()`` method, which disposes of the underlying cluster and
connections to the MongoDB server. This implementation is experimental.

To learn more about the ``IDisposable`` interface and use of the
``Dispose()`` method, see
`Dispose Pattern <https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/dispose-pattern>`__
on MSDN.

- Adds support for the ``DateOnly`` type, which represents a date value with no
time component. This type is available in .NET 6 and later. To learn more about the
``DateOnly`` type, see the
Expand Down
Loading