In This Article

XmlLineCommenter Class

Provides a XML language line commenter service.

public class XmlLineCommenter : RangeLineCommenter, ILineCommenter
Inheritance:
object RangeLineCommenter object
Implements:
ILineCommenter

Constructors

XmlLineCommenter()

Initializes a new instance of the XmlLineCommenter class.

public XmlLineCommenter()

Methods

Comment(ITextSnapshot, ITextPositionRangeCollection, ITextChangeOptions)

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

public override 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.

FindCommentTextRange(TextSnapshotRange)

Returns the full text range of the comment that surrounds the specified snapshot range, if any.

protected override TextRange? FindCommentTextRange(TextSnapshotRange snapshotRange)
Parameter Type Description
snapshotRange TextSnapshotRange

The TextSnapshotRange to examine.

Returns

TextRange?:

The full text range of the comment that surrounds the specified snapshot range, if any.

Inherited Members