public void UpdateAll(Document doc, Document selector)
{
bool foundOp = false;
foreach(string key in doc.Keys){
if(key.IndexOf('$') == 0){
foundOp = true;
break;
}
}
if(foundOp == false){
//wrap document in a $set.
Document s = new Document().Append("$set", doc);
doc = s;
}
this.Update(doc, selector, UpdateFlags.MultiUpdate);
}