In This Article

ILineCommenter Interface

Provides the base requirements for an object that can comment and uncomment lines for a particular language.

public interface ILineCommenter

Remarks

This interface type can be registered with an ISyntaxLanguage using the RegisterService(object, object) method. Once an object that implements this interface is registered with the language for this interface type, its features can be used by the language.

Methods

Comment(ITextSnapshot, ITextPositionRangeCollection, ITextChangeOptions)

Comments out the lines of code in the specified position ranges.

void Comment(ITextSnapshot snapshot, ITextPositionRangeCollection positionRanges, ITextChangeOptions options)
Parameter Type Description
snapshot ITextSnapshot

The target ITextSnapshot.

positionRanges ITextPositionRangeCollection

The ITextPositionRangeCollection indicating the position ranges over which to comment lines.

options ITextChangeOptions

The ITextChangeOptions for the change.

See Also

Uncomment(ITextSnapshot, ITextPositionRangeCollection, ITextChangeOptions)

Uncomments the lines of code in the specified position ranges.

void Uncomment(ITextSnapshot snapshot, ITextPositionRangeCollection positionRanges, ITextChangeOptions options)
Parameter Type Description
snapshot ITextSnapshot

The target ITextSnapshot.

positionRanges ITextPositionRangeCollection

The ITextPositionRangeCollection indicating the position ranges over which to uncomment lines.

options ITextChangeOptions

The ITextChangeOptions for the change.

See Also

See Also