2 overrides of ReplaceNode
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2874public override SyntaxNode ReplaceNode(SyntaxNode root, SyntaxNode declaration, SyntaxNode? newDeclaration)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
3326Public Overrides Function ReplaceNode(root As SyntaxNode, declaration As SyntaxNode, newDeclaration As SyntaxNode) As SyntaxNode
26 references to ReplaceNode
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
65return syntaxGenerator.ReplaceNode(newParentScope, firstStatement, firstStatement.WithoutLeadingBlankLinesInTrivia());
Microsoft.CodeAnalysis.CSharp.Features (2)
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
337currentInvocation = (InvocationExpressionSyntax)g.ReplaceNode(currentInvocation, nameNode, newName);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
65return syntaxGenerator.ReplaceNode(newParentScope, firstStatement, firstStatement.WithoutLeadingBlankLinesInTrivia());
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
CodeGeneration\CSharpSyntaxGenerator.cs (3)
2901return base.ReplaceNode(root, declaration, newSubDecl); 2913return base.ReplaceNode(root, declaration, newFullDecl); 2917return base.ReplaceNode(root, declaration, newDeclaration);
Microsoft.CodeAnalysis.NetAnalyzers (11)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriParametersShouldNotBeStrings.Fixer.cs (2)
114var newParameter = generator.ReplaceNode(originalParameter, originalParameterType, generator.TypeExpression(uriType)); 123return generator.ReplaceNode(original, originalParameters[parameterIndex], newParameter);
Microsoft.NetCore.Analyzers\Performance\RecommendCaseInsensitiveStringComparison.Fixer.cs (2)
181SyntaxNode newRoot = generator.ReplaceNode(root, mainInvocation.Syntax, newInvocation.WithTriviaFrom(mainInvocation.Syntax)); 211SyntaxNode newRoot = generator.ReplaceNode(root, binaryOperation.Syntax, replacement.WithTriviaFrom(binaryOperation.Syntax));
Microsoft.NetCore.Analyzers\Performance\UsePropertyInsteadOfCountMethodWhenAvailable.Fixer.cs (1)
118var replacementSyntax = generator.ReplaceNode(this._memberAccessNode, this._nameNode, generator.IdentifierName(_propertyName))
Microsoft.NetCore.Analyzers\Runtime\ForwardCancellationTokenToInvocations.Fixer.cs (1)
158return generator.ReplaceNode(root, invocation.Syntax, newInvocationWithArguments);
Microsoft.NetCore.Analyzers\Runtime\PreferConstCharOverConstUnitString.Fixer.cs (2)
110var newRoot = generator.ReplaceNode(root, argumentLiteral.Syntax, charLiteralExpressionNode); 130var newRoot = generator.ReplaceNode(root, variableGroupDeclarationOperation.Syntax, charSyntaxNode);
Microsoft.NetCore.Analyzers\Runtime\PreferStreamAsyncMemoryOverloads.Fixer.cs (1)
178SyntaxNode newRoot = generator.ReplaceNode(root, invocation.Syntax, newInvocationExpression.WithTriviaFrom(invocation.Syntax));
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.Fixer.cs (2)
110SyntaxNode newRoot = generator.ReplaceNode(root, concatExpressionSyntax, concatMethodInvocationSyntax); 132invocationSyntax = generator.ReplaceNode(invocationSyntax, namedStartIndexArgument.Syntax, renamedArgumentSyntax);
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
CodeGeneration\VisualBasicSyntaxGenerator.vb (2)
3352Return MyBase.ReplaceNode(root, declaration, newFullDecl) 3354Return MyBase.ReplaceNode(root, declaration, newDeclaration)
Microsoft.CodeAnalysis.Workspaces (2)
Editing\SyntaxEditor.cs (2)
290=> ValidateNewRoot(generator.ReplaceNode(root, currentNode, _modifier(currentNode, generator))); 307=> ValidateNewRoot(generator.ReplaceNode(root, currentNode, modifier(currentNode, generator, argument)));
Microsoft.Interop.ComInterfaceGenerator (1)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
244generatedDeclaration = generator.ReplaceNode(generatedDeclaration, generatedParameterSyntax, generator.AddAttributes(generatedParameterSyntax,
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\ConvertToLibraryImportFixer.cs (3)
248SyntaxNode generatedDeclaration = generator.ReplaceNode(methodSyntax, dllImportSyntax, libraryImportSyntax); 447SyntaxNode libraryImportSyntax = generator.ReplaceNode(dllImportSyntax, 588return generator.ReplaceNode(attribute, attribute.ArgumentList, updatedArgList);
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
244generatedDeclaration = generator.ReplaceNode(generatedDeclaration, generatedParameterSyntax, generator.AddAttributes(generatedParameterSyntax,