Skip to content

Commit 259b762

Browse files
author
rstam
committed
CSHARP-970: Correct doc comments for GetDatabase.
1 parent 6cfa95f commit 259b762

File tree

2 files changed

+17
-29
lines changed

2 files changed

+17
-29
lines changed

Diff for: MongoDB.Driver/MongoDatabase.cs

+10-15
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ public MongoDatabase(MongoServer server, string name, MongoDatabaseSettings sett
8888

8989
// factory methods
9090
/// <summary>
91-
/// Creates a new instance or returns an existing instance of MongoDatabase. Only one instance
92-
/// is created for each combination of database settings. Automatically creates an instance
93-
/// of MongoServer if needed.
91+
/// Creates an instance of a MongoDatabase.
92+
/// Automatically creates an instance of MongoServer if needed.
9493
/// </summary>
9594
/// <param name="builder">Server and database settings in the form of a MongoConnectionStringBuilder.</param>
9695
/// <returns>
@@ -105,9 +104,8 @@ public static MongoDatabase Create(MongoConnectionStringBuilder builder)
105104
}
106105

107106
/// <summary>
108-
/// Creates a new instance or returns an existing instance of MongoDatabase. Only one instance
109-
/// is created for each combination of database settings. Automatically creates an instance
110-
/// of MongoServer if needed.
107+
/// Creates an instance of a MongoDatabase.
108+
/// Automatically creates an instance of MongoServer if needed.
111109
/// </summary>
112110
/// <param name="serverSettings">The server settings for the server that contains this database.</param>
113111
/// <param name="databaseName">The name of this database (will be accessed using default settings).</param>
@@ -126,9 +124,8 @@ public static MongoDatabase Create(MongoServerSettings serverSettings, string da
126124
}
127125

128126
/// <summary>
129-
/// Creates a new instance or returns an existing instance of MongoDatabase. Only one instance
130-
/// is created for each combination of database settings. Automatically creates an instance
131-
/// of MongoServer if needed.
127+
/// Creates an instance of a MongoDatabase.
128+
/// Automatically creates an instance of MongoServer if needed.
132129
/// </summary>
133130
/// <param name="url">Server and database settings in the form of a MongoUrl.</param>
134131
/// <returns>
@@ -143,9 +140,8 @@ public static MongoDatabase Create(MongoUrl url)
143140
}
144141

145142
/// <summary>
146-
/// Creates a new instance or returns an existing instance of MongoDatabase. Only one instance
147-
/// is created for each combination of database settings. Automatically creates an instance
148-
/// of MongoServer if needed.
143+
/// Creates an instance of a MongoDatabase.
144+
/// Automatically creates an instance of MongoServer if needed.
149145
/// </summary>
150146
/// <param name="connectionString">Server and database settings in the form of a connection string.</param>
151147
/// <returns>
@@ -167,9 +163,8 @@ public static MongoDatabase Create(string connectionString)
167163
}
168164

169165
/// <summary>
170-
/// Creates a new instance or returns an existing instance of MongoDatabase. Only one instance
171-
/// is created for each combination of database settings. Automatically creates an instance
172-
/// of MongoServer if needed.
166+
/// Creates an instance of a MongoDatabase.
167+
/// Automatically creates an instance of MongoServer if needed.
173168
/// </summary>
174169
/// <param name="uri">Server and database settings in the form of a Uri.</param>
175170
/// <returns>

Diff for: MongoDB.Driver/MongoServer.cs

+7-14
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,7 @@ internal MongoServerProxyType ProxyType
426426

427427
// public indexers
428428
/// <summary>
429-
/// Gets a MongoDatabase instance representing a database on this server. Only one instance
430-
/// is created for each combination of database settings.
429+
/// Gets a MongoDatabase instance representing a database on this server.
431430
/// </summary>
432431
/// <param name="databaseName">The name of the database.</param>
433432
/// <returns>A new or existing instance of MongoDatabase.</returns>
@@ -438,8 +437,7 @@ public virtual MongoDatabase this[string databaseName]
438437
}
439438

440439
/// <summary>
441-
/// Gets a MongoDatabase instance representing a database on this server. Only one instance
442-
/// is created for each combination of database settings.
440+
/// Gets a MongoDatabase instance representing a database on this server.
443441
/// </summary>
444442
/// <param name="databaseSettings">The settings to use with this database.</param>
445443
/// <returns>A new or existing instance of MongoDatabase.</returns>
@@ -450,8 +448,7 @@ public virtual MongoDatabase this[MongoDatabaseSettings databaseSettings]
450448
}
451449

452450
/// <summary>
453-
/// Gets a MongoDatabase instance representing a database on this server. Only one instance
454-
/// is created for each combination of database settings.
451+
/// Gets a MongoDatabase instance representing a database on this server.
455452
/// </summary>
456453
/// <param name="databaseName">The name of the database.</param>
457454
/// <param name="writeConcern">The write concern to use with this database.</param>
@@ -624,8 +621,7 @@ public virtual object FetchDBRefAs(Type documentType, MongoDBRef dbRef)
624621
}
625622

626623
/// <summary>
627-
/// Gets a MongoDatabase instance representing a database on this server. Only one instance
628-
/// is created for each combination of database settings.
624+
/// Gets a MongoDatabase instance representing a database on this server.
629625
/// </summary>
630626
/// <param name="databaseSettings">The settings to use with this database.</param>
631627
/// <returns>A new or existing instance of MongoDatabase.</returns>
@@ -636,8 +632,7 @@ public virtual MongoDatabase GetDatabase(MongoDatabaseSettings databaseSettings)
636632
}
637633

638634
/// <summary>
639-
/// Gets a MongoDatabase instance representing a database on this server. Only one instance
640-
/// is created for each combination of database settings.
635+
/// Gets a MongoDatabase instance representing a database on this server.
641636
/// </summary>
642637
/// <param name="databaseName">The name of the database.</param>
643638
/// <returns>A new or existing instance of MongoDatabase.</returns>
@@ -648,8 +643,7 @@ public virtual MongoDatabase GetDatabase(string databaseName)
648643
}
649644

650645
/// <summary>
651-
/// Gets a MongoDatabase instance representing a database on this server. Only one instance
652-
/// is created for each combination of database settings.
646+
/// Gets a MongoDatabase instance representing a database on this server.
653647
/// </summary>
654648
/// <param name="databaseName">The name of the database.</param>
655649
/// <param name="writeConcern">The write concern to use with this database.</param>
@@ -665,8 +659,7 @@ public virtual MongoDatabase GetDatabase(string databaseName, WriteConcern write
665659
}
666660

667661
/// <summary>
668-
/// Gets a MongoDatabase instance representing a database on this server. Only one instance
669-
/// is created for each combination of database settings.
662+
/// Gets a MongoDatabase instance representing a database on this server.
670663
/// </summary>
671664
/// <param name="databaseName">The name of the database.</param>
672665
/// <param name="databaseSettings">The settings to use with this database.</param>

0 commit comments

Comments
 (0)