DocumentEditor Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An editor for making changes to a document's syntax tree.
public ref class DocumentEditor : Microsoft::CodeAnalysis::Editing::SyntaxEditor
public class DocumentEditor : Microsoft.CodeAnalysis.Editing.SyntaxEditor
type DocumentEditor = class
inherit SyntaxEditor
Public Class DocumentEditor
Inherits SyntaxEditor
- Inheritance
Properties
Generator |
A SyntaxGenerator to use to create and change SyntaxNode's. (Inherited from SyntaxEditor) |
OriginalDocument |
The Document specified when the editor was first created. |
OriginalRoot |
The SyntaxNode that was specified when the SyntaxEditor was constructed. (Inherited from SyntaxEditor) |
SemanticModel |
The SemanticModel of the original document. |
Methods
CreateAsync(Document, CancellationToken) |
Creates a new DocumentEditor instance. |
GetChangedDocument() |
Returns the changed Document. |
GetChangedRoot() |
Returns the changed root node. (Inherited from SyntaxEditor) |
InsertAfter(SyntaxNode, IEnumerable<SyntaxNode>) |
Insert the new nodes after the specified node already existing in the tree. (Inherited from SyntaxEditor) |
InsertAfter(SyntaxNode, SyntaxNode) |
Insert the new node after the specified node already existing in the tree. (Inherited from SyntaxEditor) |
InsertBefore(SyntaxNode, IEnumerable<SyntaxNode>) |
Insert the new nodes before the specified node already existing in the tree. (Inherited from SyntaxEditor) |
InsertBefore(SyntaxNode, SyntaxNode) |
Insert the new node before the specified node already existing in the tree. (Inherited from SyntaxEditor) |
RemoveNode(SyntaxNode, SyntaxRemoveOptions) |
Remove the node from the tree. (Inherited from SyntaxEditor) |
RemoveNode(SyntaxNode) |
Remove the node from the tree. (Inherited from SyntaxEditor) |
ReplaceNode(SyntaxNode, Func<SyntaxNode,SyntaxGenerator,SyntaxNode>) |
Replace the specified node with a node produced by the function. (Inherited from SyntaxEditor) |
ReplaceNode(SyntaxNode, SyntaxNode) |
Replace the specified node with a different node. (Inherited from SyntaxEditor) |
TrackNode(SyntaxNode) |
Makes sure the node is tracked, even if it is not changed. (Inherited from SyntaxEditor) |