2 overrides of ReplaceNode
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2735public override SyntaxNode ReplaceNode(SyntaxNode root, SyntaxNode declaration, SyntaxNode? newDeclaration)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
3377Public Overrides Function ReplaceNode(root As SyntaxNode, declaration As SyntaxNode, newDeclaration As SyntaxNode) As SyntaxNode
37 references to ReplaceNode
Microsoft.CodeAnalysis.CSharp.Features (1)
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
337currentInvocation = (InvocationExpressionSyntax)g.ReplaceNode(currentInvocation, nameNode, newName);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
CodeGeneration\CSharpSyntaxGenerator.cs (3)
2762return base.ReplaceNode(root, declaration, newSubDecl); 2774return base.ReplaceNode(root, declaration, newFullDecl); 2778return base.ReplaceNode(root, declaration, newDeclaration);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (16)
CodeGeneration\SyntaxGeneratorTests.cs (16)
2690var newCu = Generator.ReplaceNode(cu, summary, summary2); 3392var newProp = Generator.ReplaceNode(prop, getAccessor, Generator.WithAccessibility(getAccessor, Accessibility.Public)); 3395newProp = Generator.ReplaceNode(prop, setAccessor, Generator.WithAccessibility(setAccessor, Accessibility.Public)); 3894Generator.ReplaceNode(declC, declX, xTypedT), 3902Generator.ReplaceNode(declC, declY, Generator.WithType(declY, Generator.IdentifierName("T"))), 3911Generator.ReplaceNode(declC, declZ, Generator.WithType(declZ, Generator.IdentifierName("T"))), 3919Generator.ReplaceNode(declC, declX, Generator.WithAccessibility(declX, Accessibility.Private)), 3927Generator.ReplaceNode(declC, declX, Generator.WithModifiers(declX, DeclarationModifiers.None)), 3934Generator.ReplaceNode(declC, declX, Generator.WithName(declX, "Q")), 3947Generator.ReplaceNode(declC, declX, Generator.WithExpression(declX, Generator.IdentifierName("e"))), 4238Generator.ReplaceNode(declC, attrX, Generator.Attribute("A")), 4245Generator.ReplaceNode(declC, attrY, Generator.Attribute("A")), 4252Generator.ReplaceNode(declC, attrZ, Generator.Attribute("A")), 4259Generator.ReplaceNode(declC, attrX, Generator.AddAttributeArguments(attrX, [Generator.AttributeArgument(Generator.IdentifierName("e"))])), 4369Generator.ReplaceNode(declM, attrX, Generator.Attribute("Q")), 4376Generator.ReplaceNode(declM, attrX, Generator.AddAttributeArguments(attrX, [Generator.AttributeArgument(Generator.IdentifierName("e"))])),
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
CodeGeneration\VisualBasicSyntaxGenerator.vb (2)
3403Return MyBase.ReplaceNode(root, declaration, newFullDecl) 3405Return MyBase.ReplaceNode(root, declaration, newDeclaration)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (10)
CodeGeneration\SyntaxGeneratorTests.vb (10)
3091Dim newProp = _g.ReplaceNode(prop, getAccessor, _g.WithAccessibility(getAccessor, Accessibility.Public)) 3094newProp = _g.ReplaceNode(prop, setAccessor, _g.WithAccessibility(setAccessor, Accessibility.Public)) 3597Generator.ReplaceNode(declC, declX, Generator.WithType(declX, Generator.IdentifierName("T"))), 3607Generator.ReplaceNode(declC, declX, Generator.WithExpression(declX, Generator.IdentifierName("e"))), 3617Generator.ReplaceNode(declC, declX, Generator.WithName(declX, "Q")), 3633Generator.ReplaceNode(declC, declY, Generator.WithType(declY, Generator.IdentifierName("T"))), 3645Generator.ReplaceNode(declC, declZ, Generator.WithType(declZ, Generator.IdentifierName("T"))), 3655Generator.ReplaceNode(declC, declX, declZ), 3789Generator.ReplaceNode(declC, declX, Generator.Attribute("A")), 3796Generator.ReplaceNode(declC, declX, Generator.InsertAttributeArguments(declX, 0, {Generator.AttributeArgument(Generator.IdentifierName("e"))})),
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
248generatedDeclaration = generator.ReplaceNode(generatedDeclaration, generatedParameterSyntax, generator.AddAttributes(generatedParameterSyntax,
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\ConvertToLibraryImportFixer.cs (3)
236SyntaxNode generatedDeclaration = generator.ReplaceNode(methodSyntax, dllImportSyntax, libraryImportSyntax); 426SyntaxNode libraryImportSyntax = generator.ReplaceNode(dllImportSyntax, 567return generator.ReplaceNode(attribute, attribute.ArgumentList, updatedArgList);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
248generatedDeclaration = generator.ReplaceNode(generatedDeclaration, generatedParameterSyntax, generator.AddAttributes(generatedParameterSyntax,