TextSpanHelper.ValidSpan Method

Determines whether the given span lies within the given source buffer.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'Declaration
Public Shared Function ValidSpan ( _
    src As Source, _
    span As TextSpan _
) As Boolean
'Usage
Dim src As Source 
Dim span As TextSpan 
Dim returnValue As Boolean 

returnValue = TextSpanHelper.ValidSpan(src, _
    span)
public static bool ValidSpan(
    Source src,
    TextSpan span
)
public:
static bool ValidSpan(
    Source^ src, 
    TextSpan span
)
public static function ValidSpan(
    src : Source, 
    span : TextSpan
) : boolean

Parameters

Return Value

Type: System.Boolean
Returns true if the span lies entirely within the source buffer and is positive; otherwise, returns false.

Remarks

The start and end points of the span are passed to the ValidCoord method and if both points test valid, the span is then tested to make sure it is positive. If that test is also true, then this method returns true.

.NET Framework Security

See Also

Reference

TextSpanHelper Class

TextSpanHelper Members

Microsoft.VisualStudio.Package Namespace