Click or drag to resize

DocumentEditor Class



An editor for making changes to a document's syntax tree.
Inheritance Hierarchy

Namespace:  Microsoft.CodeAnalysis.Editing
Assembly:  Microsoft.CodeAnalysis.Workspaces (in Microsoft.CodeAnalysis.Workspaces.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public class DocumentEditor : SyntaxEditor

The DocumentEditor type exposes the following members.

Properties
  NameDescription
Public propertyGenerator
A SyntaxGenerator to use to create and change SyntaxNode's.
(Inherited from SyntaxEditor.)
Public propertyOriginalDocument
The Document specified when the editor was first created.
Public propertyOriginalRoot
The SyntaxNode that was specified when the SyntaxEditor was constructed.
(Inherited from SyntaxEditor.)
Public propertySemanticModel
The SemanticModel of the original document.
Top
Methods
  NameDescription
Public methodStatic memberCreateAsync
Public methodGetChangedDocument
Returns the changed Document.
Public methodGetChangedRoot
Returns the changed root node.
(Inherited from SyntaxEditor.)
Public methodInsertAfter(SyntaxNode, SyntaxNode)
Insert the new node after the specified node already existing in the tree.
(Inherited from SyntaxEditor.)
Public methodInsertAfter(SyntaxNode, IEnumerableT) (Inherited from SyntaxEditor.)
Public methodInsertBefore(SyntaxNode, SyntaxNode)
Insert the new node before the specified node already existing in the tree.
(Inherited from SyntaxEditor.)
Public methodInsertBefore(SyntaxNode, IEnumerableT) (Inherited from SyntaxEditor.)
Public methodRemoveNode(SyntaxNode)
Remove the node from the tree.
(Inherited from SyntaxEditor.)
Public methodRemoveNode(SyntaxNode, SyntaxRemoveOptions)
Remove the node from the tree.
(Inherited from SyntaxEditor.)
Public methodReplaceNode(SyntaxNode, SyntaxNode)
Replace the specified node with a different node.
(Inherited from SyntaxEditor.)
Public methodReplaceNode(SyntaxNode, FuncT1, T2, TResult) (Inherited from SyntaxEditor.)
Public methodTrackNode
Makes sure the node is tracked, even if it is not changed.
(Inherited from SyntaxEditor.)
Top
Extension Methods
See Also