TextSpanHelper.IsEmbedded(TextSpan, TextSpan) 方法

定义

确定第一个跨距是否完全包含在第一个范围中。

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

参数

span1
TextSpan

中第一个 TextSpan 对象。

span2
TextSpan

中第二个 TextSpan 对象。

返回

Boolean

true如果两个范围不同,并且的开头 span1 等于或大于的开头 span2 并且的末尾 span1 小于或等于的末尾,则返回 span2 ; 否则返回 false

注解

true如果两个范围不相等,并且 StartsAfterStartOf 和方法的调用 EndsBeforeEndOf 都返回,则此方法返回 true

适用于