A fluent interface for executing a Map/Reduce call against a collection.
Пример #1
0
        /// <summary>
        ///   Initializes a new instance of the <see cref = "MapReduce" /> class.
        /// </summary>
        /// <param name = "database">The database.</param>
        /// <param name = "name">The name.</param>
        /// <param name = "rootType">Type of the root.</param>
        public MapReduce(IMongoDatabase database, string name, Type rootType)
        {
            IsModifiable = true;
            if(database == null)
                throw new ArgumentNullException("database");
            if(name == null)
                throw new ArgumentNullException("name");
            if(rootType == null)
                throw new ArgumentNullException("rootType");

            _rootType = rootType;
            _database = database;
            Command = new MapReduceCommand(name);
        }