Source.UncommentBlock(TextSpan, String, String) Method

Definition

Uncomments the given block and returns the span of the uncommented block

public:
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, System::String ^ blockStart, System::String ^ blockEnd);
public:
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, Platform::String ^ blockStart, Platform::String ^ blockEnd);
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan UncommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, std::wstring const & blockStart, std::wstring const & blockEnd);
public virtual Microsoft.VisualStudio.TextManager.Interop.TextSpan UncommentBlock (Microsoft.VisualStudio.TextManager.Interop.TextSpan span, string blockStart, string blockEnd);
abstract member UncommentBlock : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
override this.UncommentBlock : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
Public Overridable Function UncommentBlock (span As TextSpan, blockStart As String, blockEnd As String) As TextSpan

Parameters

span
TextSpan

A TextSpan object describing the span to uncomment.

blockStart
String

A string holding the characters that start a block comment.

blockEnd
String

A string holding the characters that end a block comment.

Returns

A new TextSpan object describing the span after the comment characters have been removed.

Remarks

This method removes the start and end comment markers from the given span.

The base method expects the first characters in the span to be the start block comment string and the last characters in the span to be the end block comment string. Only if the start block comment string is found and removed, is the end block comment string searched for and removed. If the span's extent is zero, only the line specified as the starting line is examined.

This method is typically called from the UncommentSpan method.

Applies to