ITextStructureNavigator::GetSpanOfEnclosing Method (SnapshotSpan)
Visual Studio 2015
Gets the span of the enclosing syntactic element of the specified snapshot span.
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
Parameters
- activeSpan
-
Type:
Microsoft.VisualStudio.Text::SnapshotSpan
The SnapshotSpan from which to get the enclosing syntactic element.
Return Value
Type: Microsoft.VisualStudio.Text::SnapshotSpanA SnapshotSpan that represents the enclosing syntactic element. If the specified snapshot span covers multiple syntactic elements, then the method returns the least common ancestor of the elements.
If the snapshot span covers the root element (in other words, the whole document), then the method returns SnapshotSpan of the whole document.
Show: