Share via


ITextStructureNavigator.GetSpanOfEnclosing, méthode

Obtient l'étendue de l'élément syntaxique englobant de l'étendue d'instantanés spécifiée.

Espace de noms :  Microsoft.VisualStudio.Text.Operations
Assembly :  Microsoft.VisualStudio.Text.Logic (dans Microsoft.VisualStudio.Text.Logic.dll)

Syntaxe

'Déclaration
Function GetSpanOfEnclosing ( _
    activeSpan As SnapshotSpan _
) As SnapshotSpan
SnapshotSpan GetSpanOfEnclosing(
    SnapshotSpan activeSpan
)
SnapshotSpan GetSpanOfEnclosing(
    SnapshotSpan activeSpan
)
abstract GetSpanOfEnclosing : 
        activeSpan:SnapshotSpan -> SnapshotSpan
function GetSpanOfEnclosing(
    activeSpan : SnapshotSpan
) : SnapshotSpan

Paramètres

Valeur de retour

Type : Microsoft.VisualStudio.Text.SnapshotSpan
SnapshotSpan qui représente l'élément syntaxique englobant.Si l'étendue d'instantanés spécifiée couvre plusieurs éléments syntaxiques, la méthode retourne l'ancêtre commun le moins répandu des éléments.
Si l'étendue d'instantanés couvre l'élément racine (autrement dit, le document entier), la méthode retourne le SnapshotSpan du document entier.

Sécurité .NET Framework

Voir aussi

Référence

ITextStructureNavigator Interface

Microsoft.VisualStudio.Text.Operations, espace de noms