Freigeben über


TextSpanHelper.ValidSpan(Source, TextSpan) Method

Definition

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

src
Source

[in] A Source object to validate against.

span
TextSpan

[in] The TextSpan object representing the span to test.

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.

Applies to