次の方法で共有


TextSpanHelper.ValidSpan Method

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

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

Syntax

'宣言
Public Shared Function ValidSpan ( _
    src As Source, _
    span As TextSpan _
) As Boolean
public static bool ValidSpan(
    Source src,
    TextSpan span
)

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

Microsoft.VisualStudio.Package Namespace