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

AppendParameter() public method

Allows you to append a query option using the Mongo syntax
public AppendParameter ( string field, string modifier, object value ) : MongoQuery
field string
modifier string
value object
return MongoQuery
        public MongoQuery AppendParameter(string field, string modifier, object value)
        {
            //if using a modifier, set this as a document
            if (modifier is string) {
                BsonDocument parameters = new BsonDocument();
                parameters[modifier] = value;
                this._Parameters[field] = parameters;
            }
            //otherwise, just assign the value
            else {
                this._Parameters[field] = value;
            }

            //return the query to use
            return this;
        }