@@ -71,7 +71,7 @@ Replica Sets
71
71
------------
72
72
73
73
To connect to a replica set, specify the hostnames (or IP addresses) and
74
- port numbers of the replica- set members in your connection string.
74
+ port numbers of the replica set members in your connection string.
75
75
76
76
The following code shows how to use {+driver-short+} to connect to a replica set
77
77
that contains three hosts:
@@ -92,8 +92,7 @@ automatic discovery, perform one of the following actions:
92
92
93
93
In the following example, the driver uses a sample connection URI to connect to the
94
94
MongoDB replica set ``sampleRS``, which is running on port ``27017`` of three different
95
- hosts, including ``host1``. Select the :guilabel:`Synchronous` or :guilabel:`Asynchronous`
96
- tab to see the corresponding code:
95
+ hosts, including ``host1``:
97
96
98
97
.. literalinclude:: /includes/fundamentals/code-examples/connection/ReplicaSetConnection.cs
99
98
:language: csharp
@@ -113,14 +112,14 @@ balances operations across multiple MongoDB deployments, see the
113
112
114
113
If you construct a ``MongoClient`` and immediately print the string representation
115
114
of its ``nodes`` attribute, the list might be empty while the client connects to
116
- the replica- set members.
115
+ the replica set members.
117
116
118
117
Initialization
119
118
~~~~~~~~~~~~~~
120
119
121
120
To initialize a replica set, you must connect directly to a single member. To do so,
122
121
set the ``directConnection`` connection
123
- option to ``True ``. You can do this in two ways: by passing an argument to the
122
+ option to ``true ``. You can do this in two ways: by passing an argument to the
124
123
``MongoClient`` constructor or through a parameter in your connection string. Select the
125
124
:guilabel:`MongoClientSettings` or :guilabel:`Connection String` tab to see the corresponding code.
126
125
@@ -147,7 +146,7 @@ DNS Service Discovery
147
146
148
147
To use DNS service discovery to look up the DNS SRV record of the service you're connecting to,
149
148
specify the SRV connection format in your connection string. Additionally, if you enable
150
- the SRV connection format, {+driver-short+} automatically re-scans for new hosts without
149
+ the SRV connection format, the {+driver-short+} automatically re-scans for new hosts without
151
150
having to change the client configuration.
152
151
153
152
The following code shows a connection string that uses the SRV connection format:
0 commit comments