TextSpanHelper.IsEmbedded(TextSpan, TextSpan) Method

Definition

Determines whether the first span is wholly contained in the second span.

public:
 static bool IsEmbedded(Microsoft::VisualStudio::TextManager::Interop::TextSpan span1, Microsoft::VisualStudio::TextManager::Interop::TextSpan span2);
public:
 static bool IsEmbedded(Microsoft::VisualStudio::TextManager::Interop::TextSpan span1, Microsoft::VisualStudio::TextManager::Interop::TextSpan span2);
 static bool IsEmbedded(Microsoft::VisualStudio::TextManager::Interop::TextSpan span1, Microsoft::VisualStudio::TextManager::Interop::TextSpan span2);
public static bool IsEmbedded (Microsoft.VisualStudio.TextManager.Interop.TextSpan span1, Microsoft.VisualStudio.TextManager.Interop.TextSpan span2);
static member IsEmbedded : Microsoft.VisualStudio.TextManager.Interop.TextSpan * Microsoft.VisualStudio.TextManager.Interop.TextSpan -> bool
Public Shared Function IsEmbedded (span1 As TextSpan, span2 As TextSpan) As Boolean

Parameters

span1
TextSpan

[in] The first TextSpan object.

span2
TextSpan

[in] The second TextSpan object.

Returns

Returns true if the two spans are different and the start of span1 is equal to or greater than the start of span2 and the end of span1 is less than or equal to the end of span2; otherwise, returns false.

Remarks

This method returns true if the two spans are not equal, and calls to the StartsAfterStartOf and EndsBeforeEndOf methods both return true.

Applies to