Example #1
0
        /// <summary>
        /// Increments each of the fields by the number provides - first
        /// converting the value to an integer
        /// </summary>
        public void Increment(BsonDocument document)
        {
            //recast each to an integer value - I'm not sure
            //if any numeric type can be used in this instance
            foreach (var item in document.GetValues()) {
                document.Set<int>(item.Key, document.Get<int>(item.Key, 1));
            }

            //send the update request
            this._SendUpdate("$inc", UpdateOptionTypes.MultiUpdate, document);
        }