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;
        }