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