Freigeben über


ITextStructureNavigator.GetSpanOfFirstChild Method

Gets the span of the first child syntactic element of the specified snapshot span.

Namespace:  Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

Syntax

'Declaration
Function GetSpanOfFirstChild ( _
    activeSpan As SnapshotSpan _
) As SnapshotSpan
SnapshotSpan GetSpanOfFirstChild(
    SnapshotSpan activeSpan
)
SnapshotSpan GetSpanOfFirstChild(
    SnapshotSpan activeSpan
)
abstract GetSpanOfFirstChild : 
        activeSpan:SnapshotSpan -> SnapshotSpan 
function GetSpanOfFirstChild(
    activeSpan : SnapshotSpan
) : SnapshotSpan

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotSpan
A SnapshotSpan that represents the first child syntactic element.

Remarks

If the snapshot span has zero length, then the behavior is the same as that of GetSpanOfEnclosing.

If the specified snapshot span covers multiple syntactic elements, then this method returns the span of the least common ancestor of the elements. If the specified snapshot span covers the child element, then the behavior is the same as that of GetSpanOfEnclosing.

.NET Framework Security

See Also

Reference

ITextStructureNavigator Interface

Microsoft.VisualStudio.Text.Operations Namespace