36 references to ReplaceSyntaxTree
IdeCoreBenchmarks (1)
IncrementalSourceGeneratorBenchmarks.cs (1)
169compilation = compilation.ReplaceSyntaxTree(syntaxTree, changedTree);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
70.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), syntaxTree); 144compilation = compilation.ReplaceSyntaxTree(syntaxTree, newSyntaxTree);
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
70.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), syntaxTree); 144compilation = compilation.ReplaceSyntaxTree(syntaxTree, newSyntaxTree);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
202var newSemanticModel = semanticModel.Compilation.ReplaceSyntaxTree(tree, newTree).GetSemanticModel(newTree);
Microsoft.CodeAnalysis.CSharp.Features (1)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
220var updatedCompilation = semanticModel.Compilation.ReplaceSyntaxTree(
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
SourceGeneration\GeneratorDriverTests.cs (5)
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));
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (2)
1727driver = driver.RunGenerators(compilation.ReplaceSyntaxTree( 1779driver = driver.RunGenerators(compilation.ReplaceSyntaxTree(
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.cs (4)
1158driver = driver.RunGenerators(compilation.ReplaceSyntaxTree( 1208driver = driver.RunGenerators(compilation.ReplaceSyntaxTree( 1264driver = driver.RunGenerators(compilation.ReplaceSyntaxTree( 1631driver = driver.RunGenerators(compilation.ReplaceSyntaxTree(
SourceGeneration\SyntaxAwareGeneratorTests.cs (9)
1255compilation = compilation.ReplaceSyntaxTree(firstTree, newTree); 1430compilation = compilation.ReplaceSyntaxTree(firstTree, dummyTree) 1431.ReplaceSyntaxTree(lastTree, firstTree) 1432.ReplaceSyntaxTree(dummyTree, lastTree); 1463compilation = compilation.ReplaceSyntaxTree(firstTree, dummyTree) 1464.ReplaceSyntaxTree(lastTree, firstTree) 1465.ReplaceSyntaxTree(dummyTree, newLastTree); 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 (3)
Compilation\UsedAssembliesTests.cs (3)
164yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.Parse(builder.ToString(), tree.FilePath, (CSharpParseOptions)tree.Options)), before, after); 192yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.Parse(builder.ToString(), tree.FilePath, parseOptions)), before, after); 203yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.Parse(builder.ToString(), tree.FilePath, parseOptions)).
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
202var newSemanticModel = semanticModel.Compilation.ReplaceSyntaxTree(tree, newTree).GetSemanticModel(newTree);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicUnnecessaryImportsProvider.vb (1)
77Dim updatedCompilation = model.Compilation.ReplaceSyntaxTree(model.SyntaxTree, updatedSyntaxTree)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicUnnecessaryImportsProvider.vb (1)
77Dim updatedCompilation = model.Compilation.ReplaceSyntaxTree(model.SyntaxTree, updatedSyntaxTree)
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\SolutionCompilationState.TranslationAction_Actions.cs (1)
38finalCompilation = finalCompilation.ReplaceSyntaxTree(
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (1)
125newCompilation = newCompilation.ReplaceSyntaxTree(existingSyntaxTree, replacementSyntaxTree);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SymbolKeyTests.cs (1)
1420var newCompilation = compilation.ReplaceSyntaxTree(syntaxTree, newTree);