public void Fill(IPropertyUpdateOperator optr, BsonDocument doc) { switch (this.Method.Name) { case "Push": optr.PutPushUpdate(doc, (IEnumerable<object>)this.Argument); break; case "AddToSet": optr.PutAddToSetUpdate(doc, (IEnumerable<object>)this.Argument); break; default: throw new NotSupportedException(); } }
public void Fill(IPropertyUpdateOperator optr, BsonDocument doc) { switch (this.Method.Name) { case "Push": optr.PutPushUpdate(doc, (IEnumerable <object>) this.Argument); break; case "AddToSet": optr.PutAddToSetUpdate(doc, (IEnumerable <object>) this.Argument); break; default: throw new NotSupportedException(); } }
public void Fill(IPropertyUpdateOperator optr, BsonDocument doc) { switch (this.OpType) { case ExpressionType.Add: optr.PutAddUpdate(doc, this.Constant); break; case ExpressionType.Subtract: optr.PutAddUpdate(doc, GetContrary(this.Constant)); break; default: throw new NotSupportedException(this.OpType + " is not supported"); } }
public void Fill(IPropertyUpdateOperator optr, BsonDocument doc) { optr.PutConstantUpdate(doc, this.Value); }