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