In This Article

AutoCorrectorBase Class

Provides an abstract base class for an IAutoCorrector whose AutoCorrect(TextSnapshotRange) method is called at appropriate times following text changes or caret moves.

public abstract class AutoCorrectorBase : IAutoCorrector, IEditorDocumentTextChangeEventSink, IEditorViewSelectionChangeEventSink
Inheritance:
object object
Derived:
AutoCaseCorrector
Implements:
IAutoCorrector IEditorDocumentTextChangeEventSink IEditorViewSelectionChangeEventSink

Remarks

Instances of this object can be registered with an ISyntaxLanguage using the RegisterService(object, object) method. Once an instance is registered with the language for the IAutoCorrector interface type, its features can be used by the language.

Constructors

AutoCorrectorBase()

Initializes an instance of the class.

protected AutoCorrectorBase()

Methods

AutoCorrect(TextSnapshotRange)

Auto-corrects over the specified TextSnapshotRange.

public abstract void AutoCorrect(TextSnapshotRange snapshotRange)
Parameter Type Description
snapshotRange TextSnapshotRange

The TextSnapshotRange to examine.

OnDocumentTextChanged(SyntaxEditor, EditorSnapshotChangedEventArgs)

Occurs after a text change occurs to an IEditorDocument that uses this language.

protected virtual void OnDocumentTextChanged(SyntaxEditor editor, EditorSnapshotChangedEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument is changed.

e EditorSnapshotChangedEventArgs

The EditorSnapshotChangedEventArgs that contains the event data.

OnDocumentTextChanging(SyntaxEditor, EditorSnapshotChangingEventArgs)

Occurs before a text change occurs to an IEditorDocument that uses this language.

protected virtual void OnDocumentTextChanging(SyntaxEditor editor, EditorSnapshotChangingEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument is changed.

e EditorSnapshotChangingEventArgs

The EditorSnapshotChangingEventArgs that contains the event data.

OnViewSelectionChanged(IEditorView, EditorViewSelectionEventArgs)

Occurs when the selection is changed in the specified IEditorView.

protected virtual void OnViewSelectionChanged(IEditorView view, EditorViewSelectionEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e EditorViewSelectionEventArgs

The EditorViewSelectionEventArgs that contains the event data.

Inherited Members