In This Article

DotNetTextFormatterBase Class

Provides an abstract base class for text formatting a .NET language.

public abstract class DotNetTextFormatterBase : ITextFormatter
Inheritance:
object object
Derived:
CSharpTextFormatter VBTextFormatter
Implements:
ITextFormatter

Constructors

DotNetTextFormatterBase()

Initializes an instance of the class.

protected DotNetTextFormatterBase()

Methods

Format(ITextSnapshot, ITextPositionRangeCollection, TextFormatMode)

Applies text formatting to part or all of a snapshot.

public abstract void Format(ITextSnapshot snapshot, ITextPositionRangeCollection selectionPositionRanges, TextFormatMode mode = TextFormatMode.Ranges)
Parameter Type Description
snapshot ITextSnapshot

The target ITextSnapshot.

selectionPositionRanges ITextPositionRangeCollection

The ITextPositionRangeCollection indicating the selection position ranges. These are used to translate the current selection to the new snapshot that is created, even when formatting the entire snapshot.

mode TextFormatMode

A TextFormatMode indicating whether to format part or all of the snapshot. The default value is Ranges.

Remarks

The containing ITextDocument is accessible via the ITextSnapshot.

Inherited Members