CSMongo.Query.MongoQuery._SendUpdate C# (CSharp) Method

_SendUpdate() private method

private _SendUpdate ( string type, UpdateOptionTypes options, BsonDocument changes ) : void
type string
options UpdateOptionTypes
changes CSMongo.Bson.BsonDocument
return void
        private void _SendUpdate(string type, UpdateOptionTypes options, BsonDocument changes)
        {
            //update the changes to actually make
            BsonDocument document = new BsonDocument();
            document[type] = changes;

            //create the request to use
            UpdateRequest request = new UpdateRequest(this.Collection);
            request.Modifications = document;
            request.Parameters = this._Parameters;
            request.Options = options;

            //make sure something is found to change
            if (request.Modifications.FieldCount == 0) { return; }

            //send the request and get the response
            this.Collection.Database.Connection.SendRequest(request);
        }