protected bool CheckIsValid() { if (editor == null) { throw new InvalidOperationException("Session not yet started."); } if (StartOffset > editor.CaretOffset || EndOffset < editor.CaretOffset) { editor.EndSession(); return(false); } return(true); }
protected bool CheckIsValid() { if (editor == null) { throw new InvalidOperationException("Session not yet started."); } if (StartOffset > editor.CaretOffset || EndOffset < editor.CaretOffset) { Console.WriteLine($"session ended !!!! {StartOffset}-{EndOffset}:{editor.CaretOffset}"); editor.EndSession(); return(false); } return(true); }