Source.TrimSpan Method
Adjusts the given span to skip leading and trailing whitespace.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Syntax
'Declaration
Public Sub TrimSpan ( _
ByRef span As TextSpan _
)
public void TrimSpan(
ref TextSpan span
)
public:
void TrimSpan(
TextSpan% span
)
member TrimSpan :
span:TextSpan byref -> unit
public function TrimSpan(
span : TextSpan
)
Parameters
- span
Type: Microsoft.VisualStudio.TextManager.Interop.TextSpan%
[in, out] A TextSpan object representing the span to modify. Returns the adjusted span.
Remarks
This method examines the given span and adjusts the start and end points to skip all whitespace from the beginning and the end of the span, returning the extent of the modified span. This is used primarily by the UncommentSpan method before uncommenting a block comment.
.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.