/// <summary>
        /// Handles event message.
        /// </summary>
        /// <param name="message">Message.</param>
        private void HandleEventMessage(JObject message)
        {
            EventMess?.Invoke(this, message);
            //var eventType = (string)message["event"];
            //switch (eventType) {
            //    case "afterCompile":
            //        EventHandler<CompileScriptEventArgs> compileScriptHandler = CompileScriptEvent;
            //        if (compileScriptHandler != null) {
            //            var compileScriptEvent = new CompileScriptEvent(message);
            //            compileScriptHandler(this, new CompileScriptEventArgs(compileScriptEvent));
            //        }
            //        break;

            //    case "break":
            //        EventHandler<BreakpointEventArgs> breakpointHandler = BreakpointEvent;
            //        if (breakpointHandler != null) {
            //            var breakpointEvent = new BreakpointEvent(message);
            //            breakpointHandler(this, new BreakpointEventArgs(breakpointEvent));
            //        }
            //        break;

            //    case "exception":
            //        EventHandler<ExceptionEventArgs> exceptionHandler = ExceptionEvent;
            //        if (exceptionHandler != null) {
            //            var exceptionEvent = new ExceptionEvent(message);
            //            exceptionHandler(this, new ExceptionEventArgs(exceptionEvent));
            //        }
            //        break;

            //    case "beforeCompile":
            //    case "breakForCommand":
            //    case "newFunction":
            //    case "scriptCollected":
            //    case "compileError":
            //        break;

            //    default:
            //        Debug.Fail(string.Format(CultureInfo.CurrentCulture, "Unrecognized type '{0}' in event message: {1}", eventType, message));
            //        break;
            //}
        }
Example #2
0
 /// <summary>
 /// Handles event message.
 /// </summary>
 /// <param name="message">Message.</param>
 private void HandleEventMessage(JArray message) //JObject
 {
     EventMess?.Invoke(this, message[3] as JObject);
 }