예제 #1
0
 /// <summary>
 ///     Method to invoke when the RunQuery command is executed.
 /// </summary>
 private void OnRunQueryExecute()
 {
     if (CollectionNames == null)
     {
         CollectionNames = Funani.GetCollectionNames();
     }
     try
     {
         QueryException = null; // reset
         var       bsonJS = new BsonJavaScript(Query);
         BsonValue result = Funani.Eval(new EvalArgs()
         {
             Code = bsonJS
         });
         QueryResults = result.ToJson().Split();
     }
     catch (Exception ex)
     {
         QueryException = ex;
     }
 }
예제 #2
0
 /// <summary>
 ///     Method to invoke when the GetStatistics command is executed.
 /// </summary>
 private void OnGetStatisticsExecute()
 {
     Statistics = Funani.GetStats();
     LoadData();
 }