Skip to main content

WorkspaceExtensions Class

Namespace: Roslynator

Assembly: Roslynator.Workspaces.Core.dll

A set of extension methods for the workspace layer.

public static class WorkspaceExtensions

Methods

MethodSummary
InsertNodeAfterAsync(Document, SyntaxNode, SyntaxNode, CancellationToken)Creates a new document with a new node inserted after the specified node.
InsertNodeBeforeAsync(Document, SyntaxNode, SyntaxNode, CancellationToken)Creates a new document with a new node inserted before the specified node.
InsertNodesAfterAsync(Document, SyntaxNode, IEnumerable<SyntaxNode>, CancellationToken)Creates a new document with new nodes inserted after the specified node.
InsertNodesBeforeAsync(Document, SyntaxNode, IEnumerable<SyntaxNode>, CancellationToken)Creates a new document with new nodes inserted before the specified node.
RemoveNodeAsync(Document, SyntaxNode, SyntaxRemoveOptions, CancellationToken)Creates a new document with the specified node removed.
RemoveNodesAsync(Document, IEnumerable<SyntaxNode>, SyntaxRemoveOptions, CancellationToken)Creates a new document with the specified nodes removed.
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.
ReplaceNodesAsync<TNode>(Document, IEnumerable<TNode>, Func<TNode, TNode, SyntaxNode>, CancellationToken)Creates a new document with the specified old nodes replaced with new nodes.
ReplaceNodesAsync<TNode>(Solution, IEnumerable<TNode>, Func<TNode, TNode, SyntaxNode>, CancellationToken)Creates a new solution with the specified old nodes replaced with new nodes.
ReplaceTokenAsync(Document, SyntaxToken, IEnumerable<SyntaxToken>, CancellationToken)Creates a new document with the specified old token replaced with new tokens.
ReplaceTokenAsync(Document, SyntaxToken, SyntaxToken, CancellationToken)Creates a new document with the specified old token replaced with a new token.
ReplaceTriviaAsync(Document, SyntaxTrivia, IEnumerable<SyntaxTrivia>, CancellationToken)Creates a new document with the specified old trivia replaced with a new trivia.
ReplaceTriviaAsync(Document, SyntaxTrivia, SyntaxTrivia, CancellationToken)Creates a new document with the specified old trivia replaced with a new trivia.
WithTextChangeAsync(Document, TextChange, CancellationToken)Creates a new document updated with the specified text change.
WithTextChangesAsync(Document, IEnumerable<TextChange>, CancellationToken)Creates a new document updated with the specified text changes.
WithTextChangesAsync(Document, TextChange[], CancellationToken)Creates a new document updated with the specified text changes.