Source.UncommentBlock Method
Removes comment characters from around the specified span.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'Declaration
Public Overridable Function UncommentBlock ( _
span As TextSpan, _
blockStart As String, _
blockEnd As String _
) As TextSpan
public virtual TextSpan UncommentBlock(
TextSpan span,
string blockStart,
string blockEnd
)
public:
virtual TextSpan UncommentBlock(
TextSpan span,
String^ blockStart,
String^ blockEnd
)
abstract UncommentBlock :
span:TextSpan *
blockStart:string *
blockEnd:string -> TextSpan
override UncommentBlock :
span:TextSpan *
blockStart:string *
blockEnd:string -> TextSpan
public function UncommentBlock(
span : TextSpan,
blockStart : String,
blockEnd : String
) : TextSpan
Parameters
span
Type: Microsoft.VisualStudio.TextManager.Interop.TextSpanA TextSpan object describing the span to uncomment.
blockStart
Type: System.StringA string holding the characters that start a block comment.
blockEnd
Type: System.StringA string holding the characters that end a block comment.
Return Value
Type: Microsoft.VisualStudio.TextManager.Interop.TextSpan
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.