/// <summary> /// - Processes a character event into an Action that occurs while in the CsiEntry state. /// Events in this state will: /// 1. Execute C0 control characters /// 2. Ignore Delete characters /// 3. Collect Intermediate characters /// 4. Begin to ignore all remaining parameters when an invalid character is detected (CsiIgnore) /// 5. Store parameter data /// 6. Collect Control Sequence Private markers /// 7. Dispatch a control sequence with parameters for action /// </summary> /// <param name="ch"></param> private void EventCSIEntry(byte ch) { if (ASCIIChars.IsC0Code(ch)) { this.ActionExecute(ch); } else if (ASCIIChars.IsDelete(ch)) { this.ActionIgnore(ch); } else if (ASCIIChars.IsIntermediate(ch)) { this.ActionCollect(ch); this.EnterCSIIntermediate(); } else if (ASCIIChars.IsCSIInvalid(ch)) { this.EnterCSIIgnore(); } else if (ASCIIChars.IsNumericParamValue(ch) || ASCIIChars.IsParameterDelimiter(ch)) { this.ActionParam(ch); this.EnterCSIParam(); } else if (ASCIIChars.IsCSIPrivateMarker(ch)) { this.ActionCollect(ch); this.EnterCSIParam(); } else { this.ActionCSIDispatch(ch); this.EnterGround(); } }