SymbolEditor Class

Definition

An editor for making changes to symbol source declarations.

public ref class SymbolEditor sealed
public sealed class SymbolEditor
type SymbolEditor = class
Public NotInheritable Class SymbolEditor
Inheritance
SymbolEditor

Properties

ChangedSolution

The solution with the edits applied.

OriginalSolution

The original solution.

Methods

Create(Document)

Creates a new SymbolEditor instance.

Create(Solution)

Creates a new SymbolEditor instance.

EditAllDeclarationsAsync(ISymbol, SymbolEditor+AsyncDeclarationEditAction, CancellationToken)

Enables editing all the symbol's declarations. Partial types and methods may have more than one declaration.

EditAllDeclarationsAsync(ISymbol, SymbolEditor+DeclarationEditAction, CancellationToken)

Enables editing all the symbol's declarations. Partial types and methods may have more than one declaration.

EditOneDeclarationAsync(ISymbol, ISymbol, SymbolEditor+AsyncDeclarationEditAction, CancellationToken)

Enables editing the symbol's declaration where the member is also declared. Partial types and methods may have more than one declaration.

EditOneDeclarationAsync(ISymbol, ISymbol, SymbolEditor+DeclarationEditAction, CancellationToken)

Enables editing the symbol's declaration where the member is also declared. Partial types and methods may have more than one declaration.

EditOneDeclarationAsync(ISymbol, Location, SymbolEditor+AsyncDeclarationEditAction, CancellationToken)

Enables editing the definition of one of the symbol's declarations. Partial types and methods may have more than one declaration.

EditOneDeclarationAsync(ISymbol, Location, SymbolEditor+DeclarationEditAction, CancellationToken)

Enables editing the definition of one of the symbol's declarations. Partial types and methods may have more than one declaration.

EditOneDeclarationAsync(ISymbol, SymbolEditor+AsyncDeclarationEditAction, CancellationToken)

Enables editing the definition of one of the symbol's declarations. Partial types and methods may have more than one declaration.

EditOneDeclarationAsync(ISymbol, SymbolEditor+DeclarationEditAction, CancellationToken)

Enables editing the definition of one of the symbol's declarations. Partial types and methods may have more than one declaration.

GetChangedDocuments()

The documents changed since the SymbolEditor was constructed.

GetCurrentDeclarationsAsync(ISymbol, CancellationToken)

Gets the current declarations for the specified symbol.

GetCurrentSymbolAsync(ISymbol, CancellationToken)

Gets the current symbol for a source symbol.

Extension Methods

GetBaseOrInterfaceDeclarationReferenceAsync(SymbolEditor, ISymbol, ITypeSymbol, CancellationToken)

Gets the reference to the declaration of the base or interface type as part of the symbol's declaration.

SetBaseTypeAsync(SymbolEditor, INamedTypeSymbol, ITypeSymbol, CancellationToken)

Changes the base type of the symbol.

SetBaseTypeAsync(SymbolEditor, INamedTypeSymbol, Func<SyntaxGenerator,SyntaxNode>, CancellationToken)

Changes the base type of the symbol.

Applies to