/// <summary>
 /// Creates a new instance of the CustomEvalEventArgs class.
 /// </summary>
 /// <param name="processController">Which IMDbgProcessController to store in the Object.</param>
 /// <param name="callbackArgs">Which CorEvalEventArgs to encapsulate in this wrapper.</param>
 /// <param name="callbackType">What Callback type this was.</param>
 public CustomEvalEventArgs(IMDbgProcessController processController,
                            CorEvalEventArgs callbackArgs,
                            EvalCallbackType callbackType)
     : base(processController)
 {
     this.callbackArgs = callbackArgs;
     this.callbackType = callbackType;
 }
        private void EvalExceptionEventHandler(Object sender, CorEvalEventArgs e)
        {
            OriginalMDbgMessages.WriteLine("ManagedCallback::EvalException");
            if (InternalHandleRawMode(ManagedCallbackType.OnEvalException, e))
                return;

            // custom eval handling
            if (customEvals != null
                && customEvals.Contains(e.Eval))
            {
                using (var psc = new MDbgProcessStopController(this, e, false))
                {
                    var handler = (customEvals[e.Eval] as CustomEvalEventHandler);
                    customEvals.Remove(e.Eval);
                    handler(this, new CustomEvalEventArgs(psc, e, CustomEvalEventArgs.EvalCallbackType.EvalException));
                }
                return; // this was custom eval, no additional action necessary.
            }

            e.Continue = false;
            InternalSignalRuntimeIsStopped(e.Thread, new EvalExceptionStopReason(e.Eval));
        }