Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add "nupdated" field to SystemProfileInfo class.

The field "nupdated" that shows the number of documents updated by an update operation was missing from the SystemProfileInfo class. It is now added as a .NumberUpdated property.
  • Loading branch information...
commit 9d8eb8bb95d9c0fa1e74c39534da2aa865e63d77 1 parent 585abea
Einar Egilsson einaregilsson authored craiggwilson committed
10 MongoDB.Driver/SystemProfileInfo.cs
@@ -242,6 +242,15 @@ public int NumberToSkip
242 242 }
243 243
244 244 /// <summary>
  245 + /// Gets or sets the number of documents update by an update operation.
  246 + /// </summary>
  247 + public int NumberUpdated
  248 + {
  249 + get { return GetValue<int>("NumberUpdated", 0); }
  250 + set { SetValue("NumberUpdated", value); }
  251 + }
  252 +
  253 + /// <summary>
245 254 /// Gets or sets the number of yields.
246 255 /// </summary>
247 256 public int NumberOfYields
@@ -468,6 +477,7 @@ public SystemProfileInfoSerializer()
468 477 RegisterMember("NumberScanned", "nscanned", Int32Serializer.Instance, typeof(int), null);
469 478 RegisterMember("NumberToReturn", "ntoreturn", Int32Serializer.Instance, typeof(int), null);
470 479 RegisterMember("NumberToSkip", "ntoskip", Int32Serializer.Instance, typeof(int), null);
  480 + RegisterMember("NumberUpdated", "nupdated", Int32Serializer.Instance, typeof(int), null);
471 481 RegisterMember("NumberOfYields", "numYield", Int32Serializer.Instance, typeof(int), null);
472 482 RegisterMember("Op", "op", StringSerializer.Instance, typeof(string), null);
473 483 RegisterMember("Query", "query", BsonDocumentSerializer.Instance, typeof(BsonDocument), null);
2  MongoDB.DriverUnitTests/SystemProfileIntoTests.cs
@@ -79,6 +79,7 @@ public void TestAll()
79 79 NumberScanned = 6,
80 80 NumberToReturn = 7,
81 81 NumberToSkip = 8,
  82 + NumberUpdated = 9,
82 83 NumberOfYields = 10,
83 84 Op = "op",
84 85 Query = new BsonDocument("query", 1),
@@ -112,6 +113,7 @@ public void TestAll()
112 113 Assert.AreEqual(info.NumberScanned, rehydrated.NumberScanned);
113 114 Assert.AreEqual(info.NumberToReturn, rehydrated.NumberToReturn);
114 115 Assert.AreEqual(info.NumberToSkip, rehydrated.NumberToSkip);
  116 + Assert.AreEqual(info.NumberUpdated, rehydrated.NumberUpdated);
115 117 Assert.AreEqual(info.NumberOfYields, rehydrated.NumberOfYields);
116 118 Assert.AreEqual(info.Op, rehydrated.Op);
117 119 Assert.AreEqual(info.Query, rehydrated.Query);

0 comments on commit 9d8eb8b

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