示例#1
0
 public MapReduce Execute()
 {
     if (cmd.Contains("map") == false || cmd.Contains("reduce") == false)
     {
         throw new InvalidOperationException("Cannot execute without a map and reduce function");
     }
     canModify = false;
     try{
         result = new MapReduce.MapReduceResult(db.SendCommand(cmd));
     }catch (MongoCommandException mce) {
         result = new MapReduce.MapReduceResult(mce.Error);
         throw new MongoMapReduceException(mce, this);
     }
     return(this);
 }
示例#2
0
 public MapReduce Execute()
 {
     if(cmd.Contains("map") == false || cmd.Contains("reduce") == false){
         throw new InvalidOperationException("Cannot execute without a map and reduce function");
     }
     canModify = false;
     try{
         result = new MapReduce.MapReduceResult(db.SendCommand(cmd));
     }catch(MongoCommandException mce){
         result = new MapReduce.MapReduceResult(mce.Error);
         throw new MongoMapReduceException(mce, this);
     }
     return this;
 }