84 references to ReplaceNode
ILLink.CodeFixProvider (1)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
142 editor.ReplaceNode (targetNode, (d, g) => g.AddReturnAttributes (d, new[] { attribute }));
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
23editor.ReplaceNode(
src\Analyzers\Core\CodeFixes\MakeTypeAbstract\AbstractMakeTypeAbstractCodeFixProvider.cs (1)
39editor.ReplaceNode(typeDeclaration,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
327documentEditor.ReplaceNode(typeDeclaration, (declaration, _) =>
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
202editor.ReplaceNode(
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
139syntaxEditor.ReplaceNode(
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (3)
48editor.ReplaceNode( 63editor.ReplaceNode( 72editor.ReplaceNode(
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (1)
71editor.ReplaceNode(accessorList, (current, _) => current.WithAdditionalAnnotations(Formatter.Annotation));
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (1)
66editor.ReplaceNode(
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (2)
69editor.ReplaceNode( 75editor.ReplaceNode(
Microsoft.CodeAnalysis.CSharp.Features (15)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
253mainDocumentEditor.ReplaceNode(baseType, (current, _) => SimpleBaseType(((PrimaryConstructorBaseTypeSyntax)current).Type).WithTriviaFrom(baseType));
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
116editor.ReplaceNode(
InitializeParameter\InitializeParameterHelpers.cs (2)
101editor.ReplaceNode(block, (currentBlock, _) => ((BlockSyntax)currentBlock).AddStatements(statement)); 114editor.ReplaceNode(
SplitOrMergeIfStatements\CSharpIfLikeStatementGenerator.cs (2)
136editor.ReplaceNode(afterIfOrElseIf, (currentNode, _) => 158editor.ReplaceNode(elseIfClause.Parent.Parent, (currentNode, _) =>
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
327documentEditor.ReplaceNode(typeDeclaration, (declaration, _) =>
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
202editor.ReplaceNode(
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (3)
48editor.ReplaceNode( 63editor.ReplaceNode( 72editor.ReplaceNode(
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (1)
71editor.ReplaceNode(accessorList, (current, _) => current.WithAdditionalAnnotations(Formatter.Annotation));
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (1)
66editor.ReplaceNode(
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (2)
69editor.ReplaceNode( 75editor.ReplaceNode(
Microsoft.CodeAnalysis.Features (18)
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
170editor.ReplaceNode(
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
125=> editor.ReplaceNode(
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (2)
376editor.ReplaceNode( 449editor.ReplaceNode(
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
785editor.ReplaceNode(
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (1)
413callerNodeEditor.ReplaceNode(nodeToReplace, (node, generator) => inlineNode);
PullMemberUp\MembersPuller.cs (1)
346originalMemberEditor.ReplaceNode(declarationSyntax, (node, generator) => generator.WithModifiers(node, DeclarationModifiers.Override));
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (1)
118editor.ReplaceNode(
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (2)
95editor.ReplaceNode(firstIfOrElseIf, (currentNode, _) => ifGenerator.WithCondition(currentNode, newCondition)); 126editor.ReplaceNode(
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (2)
72editor.ReplaceNode(ifOrElseIf, (currentNode, _) => ifGenerator.WithCondition(currentNode, leftCondition)); 92editor.ReplaceNode(ifOrElseIf, (currentNode, _) => generator.ScopeBlock(ImmutableArray.Create(currentNode)));
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
23editor.ReplaceNode(
src\Analyzers\Core\CodeFixes\MakeTypeAbstract\AbstractMakeTypeAbstractCodeFixProvider.cs (1)
39editor.ReplaceNode(typeDeclaration,
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
426editor.ReplaceNode(expressionStatement, (node, generator) =>
src\Analyzers\Core\CodeFixes\SimplifyLinqExpression\SimplifyLinqExpressionCodeFixProvider.cs (1)
46editor.ReplaceNode(invocation, (current, generator) =>
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
57editor.ReplaceNode(conditionalExpression,
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (1)
109editor.ReplaceNode(
Microsoft.CodeAnalysis.VisualBasic.Features (3)
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (2)
185editor.ReplaceNode(nameNode, Function(n, g) newName.WithIdentifier(newName.Identifier.WithAdditionalAnnotations(annotation))) 189editor.ReplaceNode(
SplitOrMergeIfStatements\VisualBasicIfLikeStatementGenerator.vb (1)
183editor.ReplaceNode(afterIfOrElseIf,
Microsoft.CodeAnalysis.Workspaces (25)
Editing\SymbolEditorExtensions.cs (1)
85e.ReplaceNode(decl, (d, g) => g.AddBaseType(d, newBaseType));
Editing\SyntaxEditorExtensions.cs (23)
14=> editor.ReplaceNode(declaration, (d, g) => g.WithAccessibility(d, accessibility)); 17=> editor.ReplaceNode(declaration, (d, g) => g.WithModifiers(d, modifiers)); 20=> editor.ReplaceNode(declaration, (d, g) => g.RemoveAllAttributes(d)); 23=> editor.ReplaceNode(declaration, (d, g) => g.RemoveAllComments(d)); 26=> editor.ReplaceNode(declaration, (d, g) => g.RemoveAllTypeInheritance(d)); 29=> editor.ReplaceNode(declaration, (d, g) => g.WithName(d, name)); 32=> editor.ReplaceNode(declaration, (d, g) => g.WithType(d, type)); 35=> editor.ReplaceNode(declaration, (d, g) => g.WithTypeParameters(d, typeParameters)); 38=> editor.ReplaceNode(declaration, (d, g) => g.WithTypeConstraint(d, typeParameterName, kind, types)); 41=> editor.ReplaceNode(declaration, (d, g) => g.WithExpression(d, expression)); 44=> editor.ReplaceNode(declaration, (d, g) => g.WithStatements(d, statements)); 47=> editor.ReplaceNode(declaration, (d, g) => g.WithGetAccessorStatements(d, statements)); 50=> editor.ReplaceNode(declaration, (d, g) => g.WithSetAccessorStatements(d, statements)); 53=> editor.ReplaceNode(declaration, (d, g) => g.AddParameters(d, [parameter])); 56=> editor.ReplaceNode(declaration, (d, g) => g.InsertParameters(d, index, [parameter])); 59=> editor.ReplaceNode(declaration, (d, g) => g.AddAttributes(d, [attribute])); 62=> editor.ReplaceNode(declaration, (d, g) => g.AddReturnAttributes(d, [attribute])); 65=> editor.ReplaceNode(attributeDeclaration, (d, g) => g.AddAttributeArguments(d, [attributeArgument])); 68=> editor.ReplaceNode(declaration, (d, g) => g.AddMembers(d, [member])); 71=> editor.ReplaceNode(declaration, (d, g) => g.InsertMembers(d, index, members)); 74=> editor.ReplaceNode(declaration, (d, g) => g.AddInterfaceType(d, interfaceType)); 77=> editor.ReplaceNode(declaration, (d, g) => g.AddBaseType(d, baseType)); 80=> editor.ReplaceNode(declaration, (d, g) => g.RemovePrimaryConstructor(d));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
150editor.ReplaceNode(
Microsoft.Interop.ComInterfaceGenerator (3)
Analyzers\AddGeneratedComClassFixer.cs (1)
26editor.ReplaceNode(node, (node, gen) =>
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
138editor.ReplaceNode(node, (node, gen) => gen.WithModifiers(node, gen.GetModifiers(node).WithPartial(true)));
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
236editor.ReplaceNode(node, (node, gen) => gen.WithModifiers(node, gen.GetModifiers(node).WithPartial(true)));
Microsoft.Interop.LibraryImportGenerator (7)
Analyzers\ConvertToLibraryImportFixer.cs (4)
320editor.ReplaceNode(invocation, WrapInvocationWithHRExceptionThrow); 325editor.ReplaceNode(invocation, 358editor.ReplaceNode(declaration, 377editor.ReplaceNode(invocation.Parent,
Analyzers\CustomMarshallerAttributeFixer.cs (2)
348editor.ReplaceNode(declaringSyntax, (declaringSyntax, gen) => gen.AddMembers(declaringSyntax, newMembers)); 523editor.ReplaceNode(declaringSyntax, (declaringSyntax, gen) => gen.AddMembers(declaringSyntax, newMembers));
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
236editor.ReplaceNode(node, (node, gen) => gen.WithModifiers(node, gen.GetModifiers(node).WithPartial(true)));