Esempio n. 1
0
        public ISelection GetSelectionAt(int offset)
        {
            ISelection selection;

            List <ISelection> .Enumerator enumerator = this.selectionCollection.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    ISelection current = enumerator.Current;
                    if (!current.ContainsOffset(offset))
                    {
                        continue;
                    }
                    selection = current;
                    return(selection);
                }
                return(null);
            }
            finally
            {
                ((IDisposable)enumerator).Dispose();
            }
            return(selection);
        }
Esempio n. 2
0
 internal static void CallAllProperties(ISelection selection)
 {
     selection.ContainsOffset(0);
     selection.ContainsPosition(TextLocation.Empty);
     int          offset               = selection.EndOffset;
     TextLocation position             = selection.EndPosition;
     bool         empty                = selection.IsEmpty;
     bool         rectangularSelection = selection.IsRectangularSelection;
     int          length               = selection.Length;
     int          offset2              = selection.Offset;
     string       text          = selection.SelectedText;
     TextLocation startPosition = selection.StartPosition;
 }
 internal static void CallAllProperties(ISelection selection)
 {
     selection.ContainsOffset(0);
     selection.ContainsPosition(TextLocation.Empty);
     int offset = selection.EndOffset;
     TextLocation position = selection.EndPosition;
     bool empty = selection.IsEmpty;
     bool rectangularSelection = selection.IsRectangularSelection;
     int length = selection.Length;
     int offset2 = selection.Offset;
     string text = selection.SelectedText;
     TextLocation startPosition = selection.StartPosition;
 }