TextSpanHelper.ValidSpan(Source, TextSpan) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether the given span lies within the given source buffer.
public:
static bool ValidSpan(Microsoft::VisualStudio::Package::Source ^ src, Microsoft::VisualStudio::TextManager::Interop::TextSpan span);
public static bool ValidSpan (Microsoft.VisualStudio.Package.Source src, Microsoft.VisualStudio.TextManager.Interop.TextSpan span);
static member ValidSpan : Microsoft.VisualStudio.Package.Source * Microsoft.VisualStudio.TextManager.Interop.TextSpan -> bool
Public Shared Function ValidSpan (src As Source, span As TextSpan) As Boolean
Parameters
Returns
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
.