In This Article

CSharpIndentProvider Class

Provides a C# language indent provider service.

public class CSharpIndentProvider : DelimiterIndentProvider, IIndentProvider, IEditorDocumentTextChangeEventSink
Inheritance:
object DelimiterIndentProvider object
Implements:
IIndentProvider IEditorDocumentTextChangeEventSink

Constructors

CSharpIndentProvider()

Initializes an instance of the class.

public CSharpIndentProvider()

Properties

Mode

The IndentMode that specifies the mode by which to indent text.

public override IndentMode Mode { get; }

Property Value

IndentMode

Methods

GetIndentAmount(TextSnapshotOffset, int)

The IndentMode that specifies the mode by which to indent text.

public override int GetIndentAmount(TextSnapshotOffset snapshotOffset, int defaultAmount)
Parameter Type Description
snapshotOffset TextSnapshotOffset
defaultAmount int

Returns

int

OnDocumentTextChanged(SyntaxEditor, EditorSnapshotChangedEventArgs)

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

protected override 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 override void OnDocumentTextChanging(SyntaxEditor editor, EditorSnapshotChangingEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument that is changing.

e EditorSnapshotChangingEventArgs

The EditorSnapshotChangingEventArgs that contains the event data.

Inherited Members

Extension Methods