示例#1
0
 // This method evaluates the expression asynchronously.
 // This method should return immediately after it has started the expression evaluation.
 // When the expression is successfully evaluated, an IDebugExpressionEvaluationCompleteEvent2
 // must be sent to the IDebugEventCallback2 event callback
 //
 // This is primarily used for the immediate window
 int IDebugExpression2.EvaluateAsync(enum_EVALFLAGS dwFlags, IDebugEventCallback2 pExprCallback)
 {
     if (((dwFlags & enum_EVALFLAGS.EVAL_NOSIDEEFFECTS) != 0 && (dwFlags & enum_EVALFLAGS.EVAL_ALLOWBPS) == 0) && _var.IsVisualized)
     {
         IVariableInformation variable = DebuggedProcess.g_Process.Natvis.Cache.Lookup(_var);
         if (variable == null)
         {
             _var.AsyncError(pExprCallback, new AD7ErrorProperty(_var.Name, ResourceStrings.NoSideEffectsVisualizerMessage));
         }
         else
         {
             _var = variable;    // use the old value
             Task.Run(() =>
             {
                 new EngineCallback(DebuggedProcess.g_Process.Engine, pExprCallback).OnExpressionEvaluationComplete(variable);
             });
         }
     }
     else
     {
         _var.AsyncEval(pExprCallback);
     }
     return(Constants.S_OK);
 }
示例#2
0
 public void AsyncEval(IDebugEventCallback2 pExprCallback)
 {
     Parent.AsyncEval(pExprCallback);
 }