void DoProcessEvalFinished(CorApi.Portable.EvalEventArgs evalArgs, bool isException) { if (!ComObject.EqualsComObject(evalArgs.Eval, eval)) { return; } context.Session.OnEndEvaluating(); evalArgs.Continue = false; if (Token.IsCancellationRequested) { DebuggerLoggingService.LogMessage("EvalFinished() but evaluation was cancelled"); tcs.TrySetCanceled(); } else { DebuggerLoggingService.LogMessage("EvalFinished(). Setting the result"); tcs.TrySetResult(new OperationResult <CorApi.Portable.Value> (evalArgs.Eval.Result, isException)); } }
void ProcessOnEvalException(object sender, CorApi.Portable.EvalEventArgs evalArgs) { DoProcessEvalFinished(evalArgs, true); }
void ProcessOnEvalComplete(object sender, CorApi.Portable.EvalEventArgs evalArgs) { DoProcessEvalFinished(evalArgs, false); }