Source.CommentBlock(TextSpan, String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called from Comment Selection. Default behavior is to insert block style comments at beginning and end of selection. Override to add custome behavior.
public:
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan CommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, System::String ^ blockStart, System::String ^ blockEnd);
public:
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan CommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, Platform::String ^ blockStart, Platform::String ^ blockEnd);
virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan CommentBlock(Microsoft::VisualStudio::TextManager::Interop::TextSpan span, std::wstring const & blockStart, std::wstring const & blockEnd);
public virtual Microsoft.VisualStudio.TextManager.Interop.TextSpan CommentBlock (Microsoft.VisualStudio.TextManager.Interop.TextSpan span, string blockStart, string blockEnd);
abstract member CommentBlock : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
override this.CommentBlock : Microsoft.VisualStudio.TextManager.Interop.TextSpan * string * string -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
Public Overridable Function CommentBlock (span As TextSpan, blockStart As String, blockEnd As String) As TextSpan
Parameters
- blockStart
- String
A string that specifies the block comment start character or characters.
- blockEnd
- String
A string that specifies the block comment end character or characters.
Returns
The final span of the commented block including the comment delimiters
Remarks
This method surrounds the specified span with the specified block comment strings.
The base method comments out the specified span and returns a new span that includes the added comment block delimiters. This method is typically called from the CommentSpan method. If the span's extent is zero, then only the first line specified in span
is commented out after skipping any leading whitespace on the line.