Example #1
0
 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);
 }
Example #2
0
 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);
 }