77 references to ParseSyntaxTree
ConfigurationSchemaGenerator.Tests (2)
GeneratorTests.cs (2)
30private static readonly SyntaxTree s_implicitUsingsSyntaxTree = SyntaxFactory.ParseSyntaxTree(SourceText.From( 1561var sourceSyntaxTree = SyntaxFactory.ParseSyntaxTree(SourceText.From(sourceText));
IdeCoreBenchmarks (1)
SyntacticChangeRangeBenchmark.cs (1)
44_tree = SyntaxFactory.ParseSyntaxTree(_text);
Microsoft.CodeAnalysis.CSharp (3)
CommandLine\CSharpCompiler.cs (1)
207var tree = SyntaxFactory.ParseSyntaxTree(
Compilation\SyntaxAndDeclarationManager.cs (1)
241var loadedTree = SyntaxFactory.ParseSyntaxTree(
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (1)
70var tree = SyntaxFactory.ParseSyntaxTree(_text, _options, _path, cancellationToken);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
Interactive\CSharpInteractiveEvaluatorLanguageInfoProvider.cs (1)
48=> SyntaxFactory.IsCompleteSubmission(SyntaxFactory.ParseSyntaxTree(SourceText.From(text, encoding: null, SourceHashAlgorithms.Default), options: s_parseOptions));
Interactive\CSharpSendToInteractiveSubmissionProvider.cs (1)
31var tree = SyntaxFactory.ParseSyntaxTree(SourceText.From(code, encoding: null, SourceHashAlgorithms.Default), options);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
272.AddSyntaxTrees(sources.Select((s, i) => SyntaxFactory.ParseSyntaxTree(s, options: parseOptions, path: sourceCodePaths[i])))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
22613var startTree = SyntaxFactory.ParseSyntaxTree(text);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
PDB\CheckSumTest.cs (2)
34var tree1 = SyntaxFactory.ParseSyntaxTree(StringText.From(source1, Encoding.UTF8, SourceHashAlgorithm.Sha1), path: "sha1.cs"); 35var tree256 = SyntaxFactory.ParseSyntaxTree(StringText.From(source256, Encoding.UTF8, SourceHashAlgorithm.Sha256), path: "sha256.cs");
PDB\PDBTests.cs (2)
47var tree3 = SyntaxFactory.ParseSyntaxTree(SourceText.From("class C { }", encoding: null), path: "Bar.cs"); 68var tree4 = SyntaxFactory.ParseSyntaxTree(SourceText.From("class D { public void F() { } }", new UTF8Encoding(false, false)), path: "Baz.cs");
Microsoft.CodeAnalysis.CSharp.Features (1)
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (1)
118var testFileTree = SyntaxFactory.ParseSyntaxTree(testFileSourceText, semanticModel.SyntaxTree.Options, cancellationToken: cancellationToken);
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScriptCompiler.cs (1)
31=> SyntaxFactory.ParseSyntaxTree(text, parseOptions ?? DefaultParseOptions, cancellationToken: cancellationToken);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (40)
IncrementalParsing\IncrementalParsingTests.cs (31)
37return SyntaxFactory.ParseSyntaxTree(itext, options); 962var startTree = SyntaxFactory.ParseSyntaxTree(text); 976var startTree = SyntaxFactory.ParseSyntaxTree(text); 1183SyntaxTree syntaxTree = SyntaxFactory.ParseSyntaxTree(startingText); 1204SyntaxTree syntaxTree = SyntaxFactory.ParseSyntaxTree(startingText); 1223SyntaxTree syntaxTree = SyntaxFactory.ParseSyntaxTree(startingText); 1429SyntaxTree oldTree = SyntaxFactory.ParseSyntaxTree(oldText); 1576var oldTree = SyntaxFactory.ParseSyntaxTree(oldText); 1982var oldTree = SyntaxFactory.ParseSyntaxTree(oldText); 2745var tree = SyntaxFactory.ParseSyntaxTree(text); 2752var parsedTree = SyntaxFactory.ParseSyntaxTree(text2); 2766var startTree = SyntaxFactory.ParseSyntaxTree(oldText); 2772var parsedTree = SyntaxFactory.ParseSyntaxTree(newText); 2782var startTree = SyntaxFactory.ParseSyntaxTree(oldText, options: TestOptions.Script); 2795var parsedTree = SyntaxFactory.ParseSyntaxTree(newText, options: TestOptions.Script); 2811var startTree = SyntaxFactory.ParseSyntaxTree(oldText, options: TestOptions.Script); 2826var parsedTree = SyntaxFactory.ParseSyntaxTree(newText, options: TestOptions.Script); 2841var startTree = SyntaxFactory.ParseSyntaxTree(oldText, options: TestOptions.Script); 2853var parsedTree = SyntaxFactory.ParseSyntaxTree(newText, options: TestOptions.Script); 3098var oldTree = SyntaxFactory.ParseSyntaxTree(oldText); // f is a simple lambda parameter 3104var fullTree = SyntaxFactory.ParseSyntaxTree(newText); 3181var oldTree = SyntaxFactory.ParseSyntaxTree(oldText); 3183WalkTreeAndVerify(newTree.GetCompilationUnitRoot(), SyntaxFactory.ParseSyntaxTree(newText).GetCompilationUnitRoot()); 3694var tree = SyntaxFactory.ParseSyntaxTree(oldText); 3696parsedTree = SyntaxFactory.ParseSyntaxTree(newText); 3702var tree = SyntaxFactory.ParseSyntaxTree(oldText); 3704parsedTree = SyntaxFactory.ParseSyntaxTree(newText); 3723var startTree = SyntaxFactory.ParseSyntaxTree(oldText); 3729parsedTree = SyntaxFactory.ParseSyntaxTree(newText); 3734var startTree = SyntaxFactory.ParseSyntaxTree(oldText); 3737parsedTree = SyntaxFactory.ParseSyntaxTree(newText);
LexicalAndXml\PreprocessorTests.cs (2)
94return SyntaxFactory.ParseSyntaxTree(itext, options).GetCompilationUnitRoot(); 101return SyntaxFactory.ParseSyntaxTree(itext, options);
LexicalAndXml\XmlDocCommentTests.cs (1)
35return SyntaxFactory.ParseSyntaxTree(itext, options);
Parsing\RoundTrippingTests.cs (3)
28var tree = SyntaxFactory.ParseSyntaxTree(SourceText.From(text), options); 103var tree = SyntaxFactory.ParseSyntaxTree(SourceText.From(text), path: ""); 1582var tree = SyntaxFactory.ParseSyntaxTree(itext, options, "");
Syntax\SyntaxNodeTests.cs (1)
3589var treeFromSource_invalid2 = SyntaxFactory.ParseSyntaxTree(st);
Syntax\SyntaxTreeTests.cs (2)
260var oldTree = SyntaxFactory.ParseSyntaxTree(oldText); 302var oldTree = SyntaxFactory.ParseSyntaxTree(oldText, path: "old.cs");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CSharpTestSource.cs (1)
42var tree = SyntaxFactory.ParseSyntaxTree(stringText, options ?? TestOptions.RegularPreview, path);
DiagnosticTestUtilities.cs (1)
67select SyntaxFactory.ParseSyntaxTree(SourceText.From(text, encoding: null, SourceHashAlgorithms.Default))).ToArray();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.cs (1)
67return SyntaxFactory.ParseSyntaxTree(text, options, filePath, cancellationToken: cancellationToken);
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\ActiveStatementTestHelpers.cs (1)
42static (source, path) => SyntaxFactory.ParseSyntaxTree(SourceText.From(source, encoding: Encoding.UTF8, SourceHashAlgorithms.Default), path: path),
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
276return SyntaxFactory.ParseSyntaxTree(sourceText, parseOptions, source.filePath);
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (3)
67var sourceTreeA1 = SyntaxFactory.ParseSyntaxTree(SourceText.From(sourceBytesA1, sourceBytesA1.Length, encodingA, SourceHashAlgorithms.Default), TestOptions.Regular, sourceFileA.Path); 68var sourceTreeB1 = SyntaxFactory.ParseSyntaxTree(SourceText.From(sourceBytesB1, sourceBytesB1.Length, encodingB, SourceHashAlgorithms.Default), TestOptions.Regular, sourceFileB.Path); 69var sourceTreeC1 = SyntaxFactory.ParseSyntaxTree(SourceText.From(sourceBytesC1, sourceBytesC1.Length, encodingC, SourceHashAlgorithm.Sha1), TestOptions.Regular, sourceFileC.Path);
Microsoft.CodeAnalysis.Scripting.TestUtilities (2)
TestCompilationFactory.cs (2)
24new[] { CSharp.SyntaxFactory.ParseSyntaxTree(SourceText.From(source, encoding: null, SourceHashAlgorithms.Default)) }, 42new[] { CSharp.SyntaxFactory.ParseSyntaxTree(SourceText.From(source, encoding: null, SourceHashAlgorithms.Default)) },
Microsoft.CodeAnalysis.Test.Utilities (4)
AssemblyLoadTestFixture.cs (1)
532syntaxTrees: new SyntaxTree[] { SyntaxFactory.ParseSyntaxTree(SourceText.From(csSource, encoding: null, SourceHashAlgorithms.Default)) },
CommonTestBase.cs (1)
388var tree = CSharp.SyntaxFactory.ParseSyntaxTree(SourceText.From(code, encoding: null, SourceHashAlgorithms.Default), options: parseOptions);
Platform\Desktop\TestHelpers.cs (1)
82new SyntaxTree[] { SyntaxFactory.ParseSyntaxTree(SourceText.From(analyzerSource, encoding: null, SourceHashAlgorithms.Default)) },
TestBase.cs (1)
192var syntaxTree = Microsoft.CodeAnalysis.CSharp.SyntaxFactory.ParseSyntaxTree(SourceText.From(source, encoding: null, SourceHashAlgorithms.Default));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
794return Microsoft.CodeAnalysis.CSharp.SyntaxFactory.ParseSyntaxTree(sourceText, options);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionTests.cs (1)
2483var root = CSharp.SyntaxFactory.ParseSyntaxTree(SourceText.From("class C {}", encoding: null, SourceHashAlgorithm.Sha1)).GetRoot();
SyntaxPathTests.cs (2)
105var tree = SyntaxFactory.ParseSyntaxTree(text); 398var tree = SyntaxFactory.ParseSyntaxTree(text);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (1)
41private static readonly SyntaxTree s_emptyTree = SyntaxFactory.ParseSyntaxTree(SourceText.From("", encoding: null, SourceHashAlgorithms.Default));
ProjectSystemShim\TempPECompilerService.cs (1)
46trees.Add(SyntaxFactory.ParseSyntaxTree(sourceText, parsedArguments.ParseOptions, fileNames[i]));
StackDepthTest (1)
Program.cs (1)
79var tree = SyntaxFactory.ParseSyntaxTree(SourceText.From(stringText, encoding: null, SourceHashAlgorithm.Sha256), parseOptions);