Class BlockCommentStrategyBase
Base class for a strategy to comment out some code.
public abstract class BlockCommentStrategyBase
- Inheritance
-
BlockCommentStrategyBase
- Inherited Members
Methods
CommentBlock(IEnumerable<TextSegment>, string)
Comment the selected segments out.
public virtual string CommentBlock(IEnumerable<TextSegment> selections, string text)
Parameters
selections
IEnumerable<TextSegment>The selections to comment out.
text
stringText of file.
Returns
- string
The text with the out commented code.
CommentLine(Line, int)
Comments a single line out.
protected abstract string CommentLine(Line line, int indention)
Parameters
Returns
- string
The out commented text of the line.
UnCommentBlock(IEnumerable<TextSegment>, string)
Uncomment the selection.
public virtual string UnCommentBlock(IEnumerable<TextSegment> selections, string text)
Parameters
selections
IEnumerable<TextSegment>The selections to un comment.
text
stringThe text which contains the selections.
Returns
- string
The uncommented text.
UnCommentLine(Line)
Uncomments a single line.
protected abstract string UnCommentLine(Line line)
Parameters
line
LineLine to uncomment.
Returns
- string
The uncommented text of the line.