6 types derived from CSharpSyntaxTree
Microsoft.CodeAnalysis.CSharp (3)
Syntax\CSharpSyntaxTree.Dummy.cs (1)
17internal sealed class DummySyntaxTree : CSharpSyntaxTree
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (1)
17private sealed class LazySyntaxTree : CSharpSyntaxTree
Syntax\CSharpSyntaxTree.ParsedSyntaxTree.cs (1)
20private class ParsedSyntaxTree : CSharpSyntaxTree
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DeclarationTests.cs (1)
885private class CountedSyntaxTree : CSharpSyntaxTree
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\Mocks\MockCSharpSyntaxTree.cs (1)
14internal class MockCSharpSyntaxTree : CSharpSyntaxTree
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.ParsedSyntaxTree.cs (1)
17private sealed class ParsedSyntaxTree : CSharpSyntaxTree
228 references to CSharpSyntaxTree
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
42private static readonly SyntaxTree s_attributesSyntaxTree = CSharpSyntaxTree.ParseText(File.ReadAllText("ConfigurationSchemaAttributes.cs"));
Microsoft.AspNetCore.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestCompilation.cs (1)
14new[] { CSharpSyntaxTree.ParseText(source) },
Microsoft.AspNetCore.App.Analyzers.Test (1)
Infrastructure\WellKnownTypesTests.cs (1)
74var tree = CSharpSyntaxTree.ParseText(code);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
68var syntaxTree = CSharpSyntaxTree.ParseText(GetMapActionString(updatedSource), path: $"TestMapActions.cs", options: ParseOptions); 142var newSyntaxTree = CSharpSyntaxTree.Create(syntaxRootNode, options: ParseOptions, encoding: encoding, path: syntaxTree.FilePath);
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
68var syntaxTree = CSharpSyntaxTree.ParseText(GetMapActionString(updatedSource), path: $"TestMapActions.cs", options: ParseOptions); 142var newSyntaxTree = CSharpSyntaxTree.Create(syntaxRootNode, options: ParseOptions, encoding: encoding, path: syntaxTree.FilePath);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
CSharpCompiler.cs (1)
75return CSharpSyntaxTree.ParseText(
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
CompilerFailedExceptionFactoryTest.cs (1)
51var syntaxTree = CSharpSyntaxTree.ParseText("@class Test { public string Test { get; set; } }");
Microsoft.CodeAnalysis.CSharp (57)
Binder\Binder.cs (2)
254CSharpSyntaxTree csTree = (CSharpSyntaxTree)syntaxTree;
Binder\Binder_Await.cs (2)
221(nodeOrToken.SyntaxTree as CSharpSyntaxTree)?.Options?.IsFeatureEnabled(MessageID.IDS_AwaitInCatchAndFinally) == false) 227(nodeOrToken.SyntaxTree as CSharpSyntaxTree)?.Options?.IsFeatureEnabled(MessageID.IDS_AwaitInCatchAndFinally) == false)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (3)
1333SyntaxNode syntax = CSharpSyntaxTree.Dummy.GetRoot(); 3193_binder.TryGetCollectionIterationType(CSharpSyntaxTree.Dummy.GetRoot(), t1, out elementType1); 3198_binder.TryGetCollectionIterationType(CSharpSyntaxTree.Dummy.GetRoot(), t2, out elementType2);
Compilation\CSharpCompilation.cs (12)
244return IsNullableAnalysisEnabledIn((CSharpSyntaxTree)syntax.SyntaxTree, syntax.Span); 254internal bool IsNullableAnalysisEnabledIn(CSharpSyntaxTree tree, TextSpan span) 268/// from <see cref="IsNullableAnalysisEnabledIn(CSharpSyntaxTree, TextSpan)"/>. 865foreach (var tree in trees.Cast<CSharpSyntaxTree>()) 939foreach (var tree in trees.Cast<CSharpSyntaxTree>()) 985oldTree = (CSharpSyntaxTree)oldTree; 986newTree = (CSharpSyntaxTree?)newTree; 3671CSharpSyntaxTree.Dummy.GetRoot(), 4803CSharpSyntaxTree? firstTree = (CSharpSyntaxTree?)SyntaxTrees.FirstOrDefault();
Compilation\CSharpDiagnosticFilter.cs (3)
153Debug.Assert(location.SourceTree is null || location.SourceTree is CSharpSyntaxTree); 154var tree = location.SourceTree as CSharpSyntaxTree;
Compilation\CSharpSemanticModel.cs (2)
5441var syntaxTree = (CSharpSyntaxTree)Root.SyntaxTree;
Compilation\SyntaxTreeSemanticModel.cs (2)
773return ((CSharpSyntaxTree)speculativeSyntax.SyntaxTree).IsNullableAnalysisEnabled(speculativeSyntax.Span) ?? 774Compilation.IsNullableAnalysisEnabledIn((CSharpSyntaxTree)SyntaxTree, new TextSpan(position, 0));
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
640foreach (Diagnostic diagnostic in CSharpSyntaxTree.Dummy.GetDiagnostics(treelessSyntax))
CSharpExtensions.cs (9)
402var csharpTree = tree as CSharpSyntaxTree; 408var csharpTree = tree as CSharpSyntaxTree; 414var csharpTree = tree as CSharpSyntaxTree; 420var csharpTree = tree as CSharpSyntaxTree; 427return ((CSharpSyntaxTree)tree).GetPragmaDirectiveWarningState(id, position);
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (2)
64var tree = (CSharpSyntaxTree)questionToken.SyntaxTree;
FlowAnalysis\NullableWalker.cs (1)
1615return compilation.SyntaxTrees.Any(static tree => ((CSharpSyntaxTree)tree).IsNullableAnalysisEnabled(new Text.TextSpan(0, tree.Length)) == true);
SourceGeneration\CSharpGeneratorDriver.cs (1)
71=> CSharpSyntaxTree.ParseTextLazy(input.Text, (CSharpParseOptions)_state.ParseOptions, fileName);
Symbols\MethodSymbolExtensions.cs (1)
213return (CSharpSyntaxNode)CSharpSyntaxTree.Dummy.GetRoot();
Symbols\ReducedExtensionMethodSymbol.cs (1)
139var syntaxTree = CSharpSyntaxTree.Dummy;
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1390if (ReferenceEquals(returnTypeSyntax, CSharpSyntaxTree.Dummy.GetRoot()))
Symbols\SymbolExtensions.cs (1)
380return (CSharpSyntaxNode)CSharpSyntaxTree.Dummy.GetRoot();
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
287var syntaxTree = CSharpSyntaxTree.Dummy;
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
252compilation.SyntaxTrees.Any(static tree => ((CSharpSyntaxTree)tree).IsNullableAnalysisEnabled(new TextSpan(0, tree.Length)) == true);
Syntax\CSharpSyntaxNode.cs (1)
77Interlocked.CompareExchange(ref node._syntaxTree, CSharpSyntaxTree.CreateWithoutClone(node), null);
Syntax\CSharpSyntaxTree.cs (3)
78/// <returns>A clone of the original syntax node that has current <see cref="CSharpSyntaxTree"/> as its parent.</returns> 413/// <see cref="CSharpSyntaxTree.GetRoot(CancellationToken)"/> is called. 561CSharpSyntaxTree? oldTree = this;
Syntax\SyntaxFactory.cs (7)
1548=> CSharpSyntaxTree.Create((CSharpSyntaxNode)root, (CSharpParseOptions?)options ?? CSharpParseOptions.Default, path, encoding, SourceHashAlgorithm.Sha1); 1554/// <inheritdoc cref="CSharpSyntaxTree.ParseText(string, CSharpParseOptions?, string, Encoding?, CancellationToken)"/> 1562return CSharpSyntaxTree.ParseText(SourceText.From(text, encoding, SourceHashAlgorithm.Sha1), (CSharpParseOptions?)options, path, diagnosticOptions: null, isGeneratedCode: null, cancellationToken); 1566/// <inheritdoc cref="CSharpSyntaxTree.ParseText(SourceText, CSharpParseOptions?, string, CancellationToken)"/> 1573return CSharpSyntaxTree.ParseText(text, (CSharpParseOptions?)options, path, cancellationToken); 2803return CSharpSyntaxTree.ParseText(text, (CSharpParseOptions?)options, path, diagnosticOptions, isGeneratedCode: null, cancellationToken); 2832return CSharpSyntaxTree.ParseText(text, (CSharpParseOptions?)options, path, diagnosticOptions, isGeneratedCode, cancellationToken);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
CodeActions\PreviewTests.cs (1)
84solution = solution.WithDocumentSyntaxRoot(_oldDocument.Id, CSharpSyntaxTree.ParseText(ChangedDocumentText, cancellationToken: cancellationToken).GetRoot(cancellationToken));
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (1)
3241var libComp = origComp.RemoveAllSyntaxTrees().AddSyntaxTrees(CSharpSyntaxTree.ParseText(before, options: options));
Extensions\SyntaxTreeExtensionsTests.cs (3)
44var tree = CSharpSyntaxTree.ParseText(code); 59var tree = CSharpSyntaxTree.ParseText(code); 74var tree = CSharpSyntaxTree.ParseText(code);
Formatting\FormattingEngineTests.cs (1)
2537var syntaxTree = CSharpSyntaxTree.ParseText(text);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
CodeGen\CodeGenTupleTest.cs (4)
5798var tree = CSharpSyntaxTree.ParseText("class C { }"); 5909var tree = CSharpSyntaxTree.ParseText("class C { }"); 6350var syntaxTree = CSharpSyntaxTree.ParseText("class C { }"); 6386var syntaxTree = CSharpSyntaxTree.ParseText("class C { }");
Emit\DeterministicTests.cs (1)
264var tree = CSharpSyntaxTree.ParseText("class Program { static void Main() { } }");
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
PDB\CSharpDeterministicBuildCompilationTests.cs (2)
49var firstSyntaxTree = (CSharpSyntaxTree)compilation.SyntaxTrees.FirstOrDefault();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (57)
Diagnostics\DiagnosticAnalyzerTests.cs (44)
1478var tree = CSharpSyntaxTree.ParseText(string.Format(source, treeNum++), path: "SourceFileRegular.cs"); 1480tree = CSharpSyntaxTree.ParseText(string.Format(source, treeNum++), path: "AssemblyInfo.cs"); 1486tree = CSharpSyntaxTree.ParseText(string.Format(source, treeNum++), path: fileName); 1496tree = CSharpSyntaxTree.ParseText(string.Format(autoGeneratedPrefix + source, treeNum++), path: $"SourceFileWithAutoGeneratedComment{i++}.cs"); 1506tree = CSharpSyntaxTree.ParseText(string.Format(source, treeNum++), path: myGeneratedFileTrueName); 1514tree = CSharpSyntaxTree.ParseText(string.Format(source, treeNum++), path: myGeneratedFileCaseInsensitiveTrueName); 1520tree = CSharpSyntaxTree.ParseText(string.Format(source, treeNum++), path: "MyGeneratedFileFalse.cs"); 1526tree = CSharpSyntaxTree.ParseText(string.Format(source, treeNum++), path: "MyGeneratedFileAuto.cs"); 1570var tree = CSharpSyntaxTree.ParseText(source, path: "SourceFileRegular.cs"); 1612var tree1 = CSharpSyntaxTree.ParseText(source1, path: "SourceFileRegular.cs"); 1613var tree2 = CSharpSyntaxTree.ParseText(source2, path: "SourceFileRegular.Designer.cs"); 1905var tree1 = CSharpSyntaxTree.ParseText(source1, path: "Source1_File1.cs"); 1906var tree2 = CSharpSyntaxTree.ParseText(source1, path: "Source1_File2.cs"); 1907var tree3 = CSharpSyntaxTree.ParseText(source2, path: "Source2_File3.cs"); 1908var tree4 = CSharpSyntaxTree.ParseText(source3, path: "Source3_File4.generated.cs"); 1909var tree5 = CSharpSyntaxTree.ParseText(source3, path: "Source3_File5.designer.cs"); 1943var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 1964var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 1987var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2008var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2033var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2053var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2072var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2095var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2116var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2142var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2175var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2240var tree = CSharpSyntaxTree.ParseText(source, path: "Source.cs"); 2532var tree = CSharpSyntaxTree.ParseText(source); 2561var tree = CSharpSyntaxTree.ParseText(source); 2589var tree = CSharpSyntaxTree.ParseText(source); 2607var tree = CSharpSyntaxTree.ParseText(source); 2625var tree = CSharpSyntaxTree.ParseText(source); 2653var tree = CSharpSyntaxTree.ParseText(source); 2849var tree = CSharpSyntaxTree.ParseText(source); 3591var tree = CSharpSyntaxTree.ParseText(source); 3621var tree = CSharpSyntaxTree.ParseText(source); 3642var tree = CSharpSyntaxTree.ParseText(source); 3879var tree = CSharpSyntaxTree.ParseText(string.Empty); 3914var tree = CSharpSyntaxTree.ParseText(string.Empty); 4037var tree = CSharpSyntaxTree.ParseText(@"class C { }"); 4393var tree = CSharpSyntaxTree.ParseText(@"class C { }"); 4418var tree = CSharpSyntaxTree.ParseText(source); 4419var compilation = CreateCompilationWithCSharp(new[] { tree, CSharpSyntaxTree.ParseText(IsExternalInitTypeDefinition) });
Diagnostics\GetDiagnosticsTests.cs (7)
166var tree1 = CSharpSyntaxTree.ParseText(source1, path: "file1"); 167var tree2 = CSharpSyntaxTree.ParseText(source2, path: "file2"); 215var tree1 = CSharpSyntaxTree.ParseText(source1, path: "file1"); 216var tree2 = CSharpSyntaxTree.ParseText(source2, path: "file2"); 267var tree1 = CSharpSyntaxTree.ParseText(source1, path: "file1"); 268var tree2 = CSharpSyntaxTree.ParseText(source2, path: "file2"); 319var tree = CSharpSyntaxTree.ParseText(source, path: "file1");
Semantics\OutVarTests.cs (6)
36362var tree2 = CSharpSyntaxTree.ParseText(source); 36408var tree2 = CSharpSyntaxTree.ParseText(source); 36448var tree2 = CSharpSyntaxTree.ParseText(source); 36490var tree2 = CSharpSyntaxTree.ParseText(source); 36525var tree2 = CSharpSyntaxTree.ParseText(source); 36563var tree2 = CSharpSyntaxTree.ParseText(source);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests.cs (2)
241var tree = CSharpSyntaxTree.ParseText(@" 319var tree = CSharpSyntaxTree.ParseText(@"
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (35)
Semantics\LocalFunctionTests.cs (1)
8738var tree2 = CSharpSyntaxTree.ParseText(source);
Semantics\NullableContextTests.cs (5)
578var tree = (CSharpSyntaxTree)comp.SyntaxTrees[0]; 583static void verifyContextState(CSharpSyntaxTree tree, CSharpSyntaxNode syntax, NullableContextState.State expectedWarningsState, NullableContextState.State expectedAnnotationsState) 730var tree = (CSharpSyntaxTree)comp.SyntaxTrees[0];
Semantics\NullableReferenceTypesTests.cs (8)
5753var source1 = CSharpSyntaxTree.ParseText(@" 5763Assert.False(((CSharpSyntaxTree)source1).IsGeneratedCode(null, cancellationToken: default)); 5765var source2 = CSharpSyntaxTree.ParseText(@" 5777Assert.False(((CSharpSyntaxTree)source2).IsGeneratedCode(null, cancellationToken: default)); 5779var source3 = CSharpSyntaxTree.ParseText( 5790Assert.False(((CSharpSyntaxTree)source3).IsGeneratedCode(null, cancellationToken: default)); 5802Assert.False(((CSharpSyntaxTree)source4).IsGeneratedCode(null, cancellationToken: default)); 65893var tree2 = CSharpSyntaxTree.ParseText(source2);
Semantics\SyntaxTreeRootTests.cs (3)
35var tree = CSharpSyntaxTree.CreateWithoutClone(node); 113Assert.Throws<InvalidCastException>(() => { var _ = (CSharpSyntaxTree)(Object)tree.GetCompilationUnitRoot(); });
Semantics\TopLevelStatementsTests.cs (1)
8794var tree = CSharpSyntaxTree.Create(compilationUnit, TestOptions.RegularDefault, path: "", Encoding.UTF8, SourceHashAlgorithms.Default);
SourceGeneration\GeneratorDriverTests.cs (10)
1514compilation = compilation.ReplaceSyntaxTree(syntaxTree, CSharpSyntaxTree.ParseText(""" 2168compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.Single(), CSharpSyntaxTree.ParseText(source, parseOptions)); 2230compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.Single(), CSharpSyntaxTree.ParseText(source, parseOptions)); 2373compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), CSharpSyntaxTree.ParseText(source, parseOptions)); 2432var c2 = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), CSharpSyntaxTree.ParseText("class E{}", parseOptions)); 3617var syntaxTree = CSharpSyntaxTree.ParseText(source, parseOptions, path: "/detached"); 3650var invalidSyntaxTree = CSharpSyntaxTree.ParseText(source, parseOptions, path: "/detached"); 3681var syntaxTree = CSharpSyntaxTree.ParseText(source, parseOptions, path: "/detached"); 3711var invalidSyntaxTree = CSharpSyntaxTree.ParseText(source, parseOptions, path: "/detached"); 4104compilation = compilation.ReplaceSyntaxTree(tree, CSharpSyntaxTree.ParseText(source, parseOptions));
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (1)
1300compilation = compilation.ReplaceSyntaxTree(tree, CSharpSyntaxTree.ParseText(source, parseOptions));
SourceGeneration\SyntaxAwareGeneratorTests.cs (6)
1041compilation = compilation.AddSyntaxTrees(CSharpSyntaxTree.ParseText(source2, parseOptions)); 1249var newTree = CSharpSyntaxTree.ParseText(@" 1428var dummyTree = CSharpSyntaxTree.ParseText("", parseOptions); 1461var newLastTree = CSharpSyntaxTree.ParseText(lastTree.ToString(), parseOptions); 1537compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), CSharpSyntaxTree.ParseText(source2, parseOptions)); 1650compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), CSharpSyntaxTree.ParseText(source2, parseOptions));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\CompilationAPITests.cs (1)
2621var tree = CSharpSyntaxTree.ParseText("class C { }");
Compilation\SemanticModelAPITests.cs (1)
3599var tree = CSharpSyntaxTree.ParseText(@"using System.Collections.Generic;
SymbolDisplay\SymbolDisplayTests.cs (1)
6065tree = CSharpSyntaxTree.ParseText(@"
Symbols\CovariantReturnTests.cs (1)
451return comp.AddSyntaxTrees(CSharpSyntaxTree.ParseText(assignments, (CSharpParseOptions)comp.SyntaxTrees[0].Options, path: "assignments.cs", encoding: Encoding.UTF8));
Symbols\Source\NullablePublicAPITests.cs (2)
1769var tree = (CSharpSyntaxTree)comp.SyntaxTrees.Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (22)
LexicalAndXml\LexicalTests.cs (1)
3820var tree = CSharpSyntaxTree.ParseText(source);
Parsing\ParserRegressionTests.cs (2)
154CSharpSyntaxTree.ParseText(new RandomizedSourceText()); 162var tree = CSharpSyntaxTree.ParseText(code);
Syntax\SyntaxListTests.cs (4)
330var tree = CSharpSyntaxTree.ParseText(builder.ToString()); 354var tree = CSharpSyntaxTree.ParseText(builder.ToString()); 369CSharpSyntaxTree.ParseText(source).VerifyChildNodePositions(); 400var tree = CSharpSyntaxTree.ParseText(source);
Syntax\SyntaxTreeTests.cs (15)
85SyntaxTreeFactoryKind.Create => CSharpSyntaxTree.Create(root, options: parseOptions, path: "", encoding: null), 86SyntaxTreeFactoryKind.ParseText => CSharpSyntaxTree.ParseText(SourceText.From(source, Encoding.UTF8, SourceHashAlgorithm.Sha256), parseOptions), 89SyntaxTreeFactoryKind.ParsedTreeWithPath => WithInitializedDirectives(CSharpSyntaxTree.Create(root, options: parseOptions, path: "old path", Encoding.UTF8)).WithFilePath("new path"), 94Assert.Equal("#define U | #undef U | #define Y", ((CSharpSyntaxTree)tree).GetDirectives().GetDebuggerDisplay()); 111_ = ((CSharpSyntaxTree)tree).GetDirectives(); 121var tree = CSharpSyntaxTree.Create(root); 131var tree = CSharpSyntaxTree.Create(SyntaxFactory.ParseCompilationUnit(""), options: null, path: null, encoding: null, diagnosticOptions: options); 141var tree = CSharpSyntaxTree.ParseText( 156var tree = CSharpSyntaxTree.ParseText( 172var tree = CSharpSyntaxTree.ParseText( 188var tree = CSharpSyntaxTree.ParseText( 276var dummy = new CSharpSyntaxTree.DummySyntaxTree(); 317var oldTree = new CSharpSyntaxTree.DummySyntaxTree(); 327SyntaxTree oldTree = new CSharpSyntaxTree.DummySyntaxTree(); 332Assert.Equal(string.Empty, CSharpSyntaxTree.Create((CSharpSyntaxNode)oldTree.GetRoot()).FilePath);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
454Assert.True(compilation.IsNullableAnalysisEnabledIn((CSharpSyntaxTree)tree, new TextSpan(0, tree.Length)));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.ParsedSyntaxTree.cs (1)
15/// Parsed <see cref="CSharpSyntaxTree"/> that creates <see cref="SourceText"/> with given encoding and checksum algorithm.
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.cs (1)
833var tree = CSharpSyntaxTree.ParseText(code);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
50syntaxTrees: [CSharpSyntaxTree.ParseText(unconditionalSuppressMessageDef)],
Microsoft.CodeAnalysis.Rebuild (1)
CSharpCompilationFactory.cs (1)
45=> CSharpSyntaxTree.ParseText(sourceText, ParseOptions, filePath);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CSharpDeterministicKeyBuilderTests.cs (1)
427syntaxTrees: new[] { CSharpSyntaxTree.ParseText(@"// this is a comment", CSharpParseOptions.Default.WithLanguageVersion(CSharp.LanguageVersion.CSharp10)) },
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\CompilationExtensions.cs (1)
510new[] { CSharpSyntaxTree.ParseText(SourceText.From(source, encoding: null, SourceHashAlgorithms.Default)) },
Mocks\Silverlight.cs (4)
88CSharpSyntaxTree.ParseText(SourceText.From(TestResources.NetFX.Minimal.mincorlib_cs)), 89CSharpSyntaxTree.ParseText(SourceText.From(corlibExtraCode)), 90CSharpSyntaxTree.ParseText(SourceText.From(assemblyAttributes)), 98syntaxTrees: [CSharpSyntaxTree.ParseText(SourceText.From(assemblyAttributes))],
Mocks\StdOle.cs (2)
75CSharpSyntaxTree.ParseText(SourceText.From(code)), 76CSharpSyntaxTree.ParseText(SourceText.From(assemblyAttributes))
Microsoft.CodeAnalysis.UnitTests (3)
AnalyzerAssemblyLoaderTests.cs (2)
1213[CSharpSyntaxTree.ParseText(SourceText.From(testCode, encoding: null, checksumAlgorithm: SourceHashAlgorithms.Default))], 1315[CSharpSyntaxTree.ParseText(SourceText.From(analyzerCode, encoding: null, checksumAlgorithm: SourceHashAlgorithms.Default))],
Diagnostics\AnalysisContextInfoTests.cs (1)
113var syntaxTree = CSharpSyntaxTree.ParseText(source, path: fileName, options: parseOptions);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Attributes\InternalsVisibleToAndStrongNameTests.vb (1)
838syntaxTrees:={CSharp.CSharpSyntaxTree.ParseText(cSource)},
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
FindReferencesTests.cs (1)
232var tree = Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.ParseText(
Microsoft.DotNet.GenFacades (2)
NotSupportedAssemblyGenerator.cs (1)
79syntaxTree = CSharpSyntaxTree.ParseText(File.ReadAllText(sourceFile), new CSharpParseOptions(languageVersion));
TypeParser.cs (1)
147SyntaxTree tree = CSharpSyntaxTree.ParseText(File.ReadAllText(sourceFile), options);
Microsoft.Gen.Logging.Unit.Tests (1)
CompilationHelper.cs (1)
49syntaxTrees: new[] { CSharpSyntaxTree.ParseText(source) },
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
187var tree = CSharpSyntaxTree.ParseText(trainProgramCSFileContent);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\EntryPointFinderTests.cs (1)
37var compilation = CSharpCompilation.Create("Test", references: [TestBase.MscorlibRef]).AddSyntaxTrees(CSharpSyntaxTree.ParseText($$"""
Mvc.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestCompilation.cs (1)
14new[] { CSharpSyntaxTree.ParseText(source) },
System.Windows.Forms.Design.Tests (1)
System\Resources\Tools\CodeDomCompileHelper.cs (1)
36new[] { CSharpSyntaxTree.ParseText(source) },
System.Windows.Forms.PrivateSourceGenerators.Tests (1)
EnumValidationTests.cs (1)
291SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText(source);
WinShimmer (1)
Program.cs (1)
50.AddSyntaxTrees(CSharpSyntaxTree.ParseText($@"