Пример #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();
     }
 }
Пример #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();
            }
        }
Пример #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");
            }
        }
Пример #4
0
 public void Fill(IPropertyUpdateOperator optr, BsonDocument doc)
 {
     optr.PutConstantUpdate(doc, this.Value);
 }
Пример #5
0
 public void Fill(IPropertyUpdateOperator optr, BsonDocument doc)
 {
     optr.PutConstantUpdate(doc, this.Value);
 }