Skip to content

Commit

Permalink
Minor.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed May 18, 2010
1 parent 5730f37 commit 561c4dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/MongoDB/Document.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using MongoDB.Util;

namespace MongoDB
Expand Down Expand Up @@ -474,9 +475,7 @@ public Document Merge(Document source)
/// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.
/// </returns>
public IEnumerator<KeyValuePair<string, object>> GetEnumerator(){
foreach(var orderedKey in _orderedKeys){
yield return new KeyValuePair<string, object>(orderedKey, _dictionary[orderedKey]);
}
return _orderedKeys.Select(orderedKey => new KeyValuePair<string, object>(orderedKey, _dictionary[orderedKey])).GetEnumerator();
}

/// <summary>
Expand Down

0 comments on commit 561c4dd

Please sign in to comment.