Example #1
0
 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();
     }
 }
Example #2
0
        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();
            }
        }
Example #3
0
        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");
            }
        }
Example #4
0
 public void Fill(IPropertyUpdateOperator optr, BsonDocument doc)
 {
     optr.PutConstantUpdate(doc, this.Value);
 }
Example #5
0
 public void Fill(IPropertyUpdateOperator optr, BsonDocument doc)
 {
     optr.PutConstantUpdate(doc, this.Value);
 }