AvalonStudio.TextEditor.TextEditor.GetSelectionAsSegment C# (CSharp) Метод

GetSelectionAsSegment() публичный Метод

public GetSelectionAsSegment ( ) : TextSegment
Результат AvalonStudio.TextEditor.Document.TextSegment
        public TextSegment GetSelectionAsSegment()
        {
            TextSegment result = null;

            if (SelectionStart < SelectionEnd)
            {
                result = new TextSegment { StartOffset = SelectionStart, EndOffset = SelectionEnd };
            }
            else
            {
                result = new TextSegment { StartOffset = SelectionEnd, EndOffset = SelectionStart };
            }

            return result;
        }