24 references to ReplaceNodes
Microsoft.CodeAnalysis (1)
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
53return root.ReplaceNodes(nodes, (n, r) => n.HasAnnotation(GetId(n)!) ? r : r.WithAdditionalAnnotations(GetId(n)!));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
281root = root.ReplaceNodes(memberDeclarations, computeReplacementNode: (_, n) => n.WithAdditionalAnnotations(s_memberAnnotation));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
223var compilationUnitWithReplacedNamespaces = compilationUnit.ReplaceNodes( 261var namespaceDeclarationWithReplacedNamespaces = usingContainer.ReplaceNodes(
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
220return parameterList.ReplaceNodes( 238return parameterList.ReplaceNodes(
Microsoft.CodeAnalysis.CSharp.Features (6)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
242return declaration.ReplaceNodes(
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
485return statement.ReplaceNodes(replacements.Keys, (orig, partiallyReplaced) => replacements[orig]);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
223var compilationUnitWithReplacedNamespaces = compilationUnit.ReplaceNodes( 261var namespaceDeclarationWithReplacedNamespaces = usingContainer.ReplaceNodes(
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
220return parameterList.ReplaceNodes( 238return parameterList.ReplaceNodes(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SyntaxNodeTests.cs (2)
517var exprWithAnnotations = expr.ReplaceNodes(identifierNodes, (e, e2) => e2.WithAdditionalAnnotations(myAnnotation)); 2114var replaced = expr.ReplaceNodes(
Syntax\TrackNodeTests.cs (2)
126var replacedExpr = trackedExpr.ReplaceNodes(trackedExpr.DescendantNodes().OfType<IdentifierNameSyntax>(), (original, changed) => currentA); 138var replacedExpr = trackedExpr.ReplaceNodes(trackedExpr.DescendantNodes().OfType<IdentifierNameSyntax>(), (original, changed) => currentA);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1793method.ReplaceNodes(method.ParameterList.Parameters, (_, p) => RemoveDefaultValue(p, removeDefaults))
Microsoft.CodeAnalysis.Features (1)
ExtractMethod\SelectionResult.cs (1)
231return root.ReplaceNodes(tokenMap.Keys, (o, n) => o.WithAdditionalAnnotations(tokenMap[o]));
Microsoft.CodeAnalysis.UnitTests (2)
CommonSyntaxTests.cs (2)
215trackedExpr = trackedExpr.ReplaceNodes( 238trackedExpr = trackedExpr.ReplaceNodes(
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
151root = root.ReplaceNodes(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (1)
303return root.ReplaceNodes(
Microsoft.Interop.SourceGeneration (1)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (1)
413=> originalTypeSyntax.ReplaceNodes(
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
126root = root.ReplaceNodes(