@@ -86,6 +86,7 @@ public sealed class ConnectionString
8686 private ReadPreferenceMode ? _readPreference ;
8787 private IReadOnlyList < TagSet > _readPreferenceTags ;
8888 private string _replicaSet ;
89+ private bool ? _retryWrites ;
8990 private ConnectionStringScheme _scheme ;
9091 private TimeSpan ? _serverSelectionTimeout ;
9192 private TimeSpan ? _socketTimeout ;
@@ -327,6 +328,14 @@ public IReadOnlyList<TagSet> ReadPreferenceTags
327328 }
328329
329330 /// <summary>
331+ /// Gets a value indicating whether or not to retry writes.
332+ /// </summary>
333+ public bool ? RetryWrites
334+ {
335+ get { return _retryWrites ; }
336+ }
337+
338+ /// <summary>
330339 /// Gets the scheme.
331340 /// </summary>
332341 public ConnectionStringScheme Scheme
@@ -464,6 +473,7 @@ public ConnectionString Resolve()
464473 /// Resolves a connection string. If the connection string indicates more information is available
465474 /// in the DNS system, it will acquire that information as well.
466475 /// </summary>
476+ /// <param name="cancellationToken">The cancellation token.</param>
467477 /// <returns>A resolved ConnectionString.</returns>
468478 public async Task < ConnectionString > ResolveAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
469479 {
@@ -764,6 +774,9 @@ private void ParseOption(string name, string value)
764774 case "replicaset" :
765775 _replicaSet = value ;
766776 break ;
777+ case "retrywrites" :
778+ _retryWrites = ParseBoolean ( name , value ) ;
779+ break ;
767780 case "safe" :
768781 var safe = ParseBoolean ( name , value ) ;
769782 if ( _w == null )
0 commit comments