In This Article

AutoCaseCorrector Class

Provides a default implementation of an IAutoCorrector that examines tokens for case-insensitive matches and auto-corrects them to proper case.

public class AutoCaseCorrector : AutoCorrectorBase, IAutoCorrector, IEditorDocumentTextChangeEventSink, IEditorViewSelectionChangeEventSink
Inheritance:
object AutoCorrectorBase object
Derived:
VBAutoCaseCorrector
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

AutoCaseCorrector()

Initializes an instance of the class.

public AutoCaseCorrector()

Methods

AutoCorrect(TextSnapshotRange)

Auto-corrects over the specified TextSnapshotRange.

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

The TextSnapshotRange to examine.

GetCaseCorrectText(ITextSnapshot, IToken)

Returns the case-corrected text for the specified IToken.

protected virtual string GetCaseCorrectText(ITextSnapshot snapshot, IToken token)
Parameter Type Description
snapshot ITextSnapshot

The source ITextSnapshot.

token IToken

The IToken to examine.

Returns

string:

The case-corrected text for the specified IToken. Returns null if no case-correction is required.

Inherited Members