[CSHARP-929] New MongoClient ctor Created: 13/Mar/14  Updated: 20/Mar/14  Resolved: 20/Mar/14

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Trivial - P5
Reporter: Peter Garafano (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Add a new constructor for MongoClient that will take a string formatted for string.Format() and params string[] to format into the connection string.

Example:

new MongoClient("mongodb://{0}:27017?replicaSet={1}", Environment.MachineName, "MyReplSet");

would replace

new MongoClient(string.Format("mongodb://{0}:27017?replicaSet={1}", Environment.MachineName, "MyReplSet"));



 Comments   
Comment by Craig Wilson [ 20/Mar/14 ]

Thanks Peter,

We think using string.Format is sufficient and not overly burdensome.

Craig

Generated at Wed Feb 07 21:38:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.