Skip to content

Commit fcd7fc1

Browse files
authored
DOCSP-43829 - Disposable IMongoClient (#241)
1 parent 4ba81c5 commit fcd7fc1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

source/whats-new.txt

+11
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ The 3.0 driver release includes the following new features:
4949
`mongocsharpdriver <https://www.nuget.org/packages/mongocsharpdriver/#readme-body-tab>`__ NuGet package,
5050
which implements the v1.x driver API in driver versions 2.x. This package will no
5151
longer receive updates.
52+
5253
- Adds the ``MongoClientSettings.TranslationOptions`` connection option, which specifies
5354
options for translating LINQ queries to the Query API. See :ref:`csharp-connection-options`
5455
for more information.
@@ -59,6 +60,16 @@ The 3.0 driver release includes the following new features:
5960
`Half Struct <https://learn.microsoft.com/en-us/dotnet/api/system.half?view=net-8.0>`__
6061
API reference page on MSDN.
6162

63+
- The ``IMongoClient`` interface inherits the ``IDisposable`` interface. As a result, the
64+
``MongoClient`` class and other classes that implement the ``IMongoClient`` interface
65+
contain a ``Dispose()`` method, which disposes of the underlying cluster and
66+
connections to the MongoDB server. This implementation is experimental.
67+
68+
To learn more about the ``IDisposable`` interface and use of the
69+
``Dispose()`` method, see
70+
`Dispose Pattern <https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/dispose-pattern>`__
71+
on MSDN.
72+
6273
- Adds support for the ``DateOnly`` type, which represents a date value with no
6374
time component. This type is available in .NET 6 and later. To learn more about the
6475
``DateOnly`` type, see the

0 commit comments

Comments
 (0)