다음을 통해 공유


TextSpanHelper.ValidSpan Method

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

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

Syntax

‘선언
Public Shared Function ValidSpan ( _
    src As Source, _
    span As TextSpan _
) As Boolean
‘사용 방법
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
)
static member ValidSpan : 
        src:Source * 
        span:TextSpan -> bool 
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