WorkspaceExtensions.ReplaceNodeAsync Method
Containing Type: WorkspaceExtensions
Assembly: Roslynator.Workspaces.Core.dll
Overloads
Method | Summary |
---|---|
ReplaceNodeAsync(Document, SyntaxNode, IEnumerable<SyntaxNode>, CancellationToken) | Creates a new document with the specified old node replaced with new nodes. |
ReplaceNodeAsync(Document, SyntaxNode, SyntaxNode, CancellationToken) | Creates a new document with the specified old node replaced with a new node. |
ReplaceNodeAsync<TNode>(Solution, TNode, TNode, CancellationToken) | Creates a new solution with the specified old node replaced with a new node. |
ReplaceNodeAsync(Document, SyntaxNode, IEnumerable<SyntaxNode>, CancellationToken)
Creates a new document with the specified old node replaced with new nodes.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReplaceNodeAsync(this Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxNode oldNode, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> newNodes, System.Threading.CancellationToken cancellationToken = default)
Parameters
document Document
oldNode SyntaxNode
newNodes IEnumerable<SyntaxNode>
cancellationToken CancellationToken
Returns
ReplaceNodeAsync(Document, SyntaxNode, SyntaxNode, CancellationToken)
Creates a new document with the specified old node replaced with a new node.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReplaceNodeAsync(this Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxNode oldNode, Microsoft.CodeAnalysis.SyntaxNode newNode, System.Threading.CancellationToken cancellationToken = default)
Parameters
document Document
oldNode SyntaxNode
newNode SyntaxNode
cancellationToken CancellationToken
Returns
ReplaceNodeAsync<TNode>(Solution, TNode, TNode, CancellationToken)
Creates a new solution with the specified old node replaced with a new node.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution> ReplaceNodeAsync<TNode>(this Microsoft.CodeAnalysis.Solution solution, TNode oldNode, TNode newNode, System.Threading.CancellationToken cancellationToken = default) where TNode : Microsoft.CodeAnalysis.SyntaxNode
Type Parameters
TNode
Parameters
solution Solution
oldNode TNode
newNode TNode
cancellationToken CancellationToken