10 references to From
Microsoft.CodeAnalysis.UnitTests (10)
EmbeddedTextTests.cs (2)
203var actual = SourceText.From(new StringReader(SmallSource), SmallSource.Length, Encoding.UTF8, SourceHashAlgorithm.Sha1); 218var actual = SourceText.From(new StringReader(LargeSource), LargeSource.Length, Encoding.UTF8, SourceHashAlgorithm.Sha1);
Text\SourceTextTests.cs (8)
356var actualSourceText = SourceText.From(actual, expected.Length); 360Assert.Same(s_utf8, SourceText.From(actual, expected.Length, s_utf8).Encoding); 361Assert.Same(s_unicode, SourceText.From(actual, expected.Length, s_unicode).Encoding); 362Assert.Null(SourceText.From(actual, expected.Length, null).Encoding); 372var actualSourceText = SourceText.From(actual, expected.Length); 379Assert.Same(s_utf8, SourceText.From(actual, expected.Length, s_utf8).Encoding); 380Assert.Same(s_unicode, SourceText.From(actual, expected.Length, s_unicode).Encoding); 381Assert.Null(SourceText.From(actual, expected.Length, null).Encoding);