14 references to FromSpan
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
157
return TextLine.
FromSpan
(_text, TextSpan.FromBounds(line.Start, line.End));
Microsoft.CodeAnalysis.UnitTests (13)
Text\StringText_LineTest.cs (13)
21
var line = TextLine.
FromSpan
(text, span);
32
var line = TextLine.
FromSpan
(text, span);
43
var line = TextLine.
FromSpan
(text, span);
53
var line = TextLine.
FromSpan
(text, new TextSpan(0, 3));
62
Assert.Throws<ArgumentOutOfRangeException>(() => TextLine.
FromSpan
(text, new TextSpan(0, 0)));
69
Assert.Throws<ArgumentOutOfRangeException>(() => TextLine.
FromSpan
(text, new TextSpan(0, 3)));
76
Assert.Throws<ArgumentOutOfRangeException>(() => TextLine.
FromSpan
(text, new TextSpan(1, 5)));
84
var line = TextLine.
FromSpan
(text, new TextSpan(start, 0));
98
var line = TextLine.
FromSpan
(text, new TextSpan(0, 0));
107
Assert.Throws<ArgumentOutOfRangeException>(() => TextLine.
FromSpan
(text, new TextSpan(1, 10)));
114
Assert.Throws<ArgumentOutOfRangeException>(() => TextLine.
FromSpan
(text, new TextSpan(-1, 2)));
121
Assert.Throws<ArgumentOutOfRangeException>(() => TextLine.
FromSpan
(text, new TextSpan(7, 0)));
128
Assert.Throws<ArgumentNullException>(() => TextLine.
FromSpan
(null, new TextSpan(0, 2)));