public TextRun GetTextRun(int textSourceIndex) { if (_textStyleRuns.IsEmpty) { return(new TextEndOfParagraph()); } var styleRun = _textStyleRuns[0]; _textStyleRuns = _textStyleRuns.Skip(1); return(new TextCharacters(_text.AsSlice(styleRun.TextPointer.Start, styleRun.TextPointer.Length), _defaultStyle)); }
public TextRun GetTextRun(int textSourceIndex) { if (_styleSpans.IsEmpty) { return(new TextEndOfParagraph()); } var currentSpan = _styleSpans[0]; _styleSpans = _styleSpans.Skip(1); return(new TextCharacters(_text.AsSlice(currentSpan.Start, currentSpan.Length), _defaultStyle)); }