Skip to content
Browse files

Merging Alexander Nagy's pull request for CSHARP-366 and CSHARP-367 w…

…ith minute changes.
  • Loading branch information...
1 parent df93238 commit a87265e531ae7a743f9b7eb17cfe64bdd551a587 rstam committed
Showing with 9 additions and 8 deletions.
  1. +1 −0 CSharpDriver-2010.sln
  2. +6 −6 Driver/Core/MongoCollection.cs
  3. +1 −1 Driver/Internal/MongoConnection.cs
  4. +1 −1 README.md
View
1 CSharpDriver-2010.sln
@@ -14,6 +14,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{00502D63-7789-410D-B6BE-5F16327FF810}"
ProjectSection(SolutionItems) = preProject
GlobalAssemblyInfo.cs = GlobalAssemblyInfo.cs
+ README.md = README.md
Release Notes v1.3.txt = Release Notes v1.3.txt
uuidhelpers.js = uuidhelpers.js
EndProjectSection
View
12 Driver/Core/MongoCollection.cs
@@ -974,7 +974,7 @@ public virtual IEnumerable<SafeModeResult> InsertBatch(Type nominalType, IEnumer
var connection = server.AcquireConnection(database, false); // not slaveOk
try
{
- var safeMode = options.SafeMode ?? this.settings.SafeMode;
+ var safeMode = options.SafeMode ?? settings.SafeMode;
List<SafeModeResult> results = (safeMode.Enabled) ? new List<SafeModeResult>() : null;
@@ -1154,7 +1154,7 @@ public virtual SafeModeResult Remove(IMongoQuery query, RemoveFlags flags, SafeM
var writerSettings = GetWriterSettings(connection);
using (var message = new MongoDeleteMessage(writerSettings, FullName, flags, query))
{
- return connection.SendMessage(message, safeMode ?? this.settings.SafeMode);
+ return connection.SendMessage(message, safeMode ?? settings.SafeMode);
}
}
finally
@@ -1292,7 +1292,7 @@ public virtual SafeModeResult Save(Type nominalType, object document, MongoInser
}
var query = Query.EQ("_id", idBsonValue);
var update = Builders.Update.Replace(nominalType, document);
- var updateOptions = new MongoUpdateOptions()
+ var updateOptions = new MongoUpdateOptions
{
CheckElementNames = options.CheckElementNames,
Flags = UpdateFlags.Upsert,
@@ -1371,7 +1371,7 @@ public virtual SafeModeResult Update(IMongoQuery query, IMongoUpdate update, Mon
var writerSettings = GetWriterSettings(connection);
using (var message = new MongoUpdateMessage(writerSettings, FullName, options.CheckElementNames, options.Flags, query, update))
{
- var safeMode = options.SafeMode ?? this.settings.SafeMode;
+ var safeMode = options.SafeMode ?? settings.SafeMode;
return connection.SendMessage(message, safeMode);
}
}
@@ -1390,7 +1390,7 @@ public virtual SafeModeResult Update(IMongoQuery query, IMongoUpdate update, Mon
/// <returns>A SafeModeResult (or null if SafeMode is not being used).</returns>
public virtual SafeModeResult Update(IMongoQuery query, IMongoUpdate update, SafeMode safeMode)
{
- var options = new MongoUpdateOptions() { SafeMode = safeMode };
+ var options = new MongoUpdateOptions { SafeMode = safeMode };
return Update(query, update, options);
}
@@ -1403,7 +1403,7 @@ public virtual SafeModeResult Update(IMongoQuery query, IMongoUpdate update, Saf
/// <returns>A SafeModeResult (or null if SafeMode is not being used).</returns>
public virtual SafeModeResult Update(IMongoQuery query, IMongoUpdate update, UpdateFlags flags)
{
- var options = new MongoUpdateOptions() { Flags = flags };
+ var options = new MongoUpdateOptions { Flags = flags };
return Update(query, update, options);
}
View
2 Driver/Internal/MongoConnection.cs
@@ -157,7 +157,7 @@ internal void Authenticate(string databaseName, MongoCredentials credentials)
new MongoCommandException(commandResult));
}
- string nonce = commandResult.Response["nonce"].AsString;
+ var nonce = commandResult.Response["nonce"].AsString;
var passwordDigest = MongoUtils.Hash(credentials.Username + ":mongo:" + credentials.Password);
var digest = MongoUtils.Hash(nonce + credentials.Username + passwordDigest);
var authenticateCommand = new CommandDocument
View
2 README.md
@@ -29,10 +29,10 @@ http://jira.mongodb.org/browse/CSHARP
* Richard Kreuter richard@10gen.com
* Kevin Lewis kevin.l.lewis@gmail.com
* Dow Liu redforks@gmail.com
+* Alexander Nagy optimiz3@gmail.com
* Andrew Rondeau github@andrewrondeau.com
* Ed Rooth edward.rooth@wallstreetjapan.com
* Testo test1@doramail.com
* Craig Wilson craiggwilson@gmail.com
-* Alexander Nagy optimiz3@gmail.com
If you have contributed and I have neglected to add you to this list please contact me at robert@10gen.com to be added to the list (with apologies).

0 comments on commit a87265e

Please sign in to comment.
Something went wrong with that request. Please try again.