Share via


ITextStructureNavigator.GetSpanOfPreviousSibling, méthode

Obtient l'étendue de l'élément syntaxique frère précédent 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 GetSpanOfPreviousSibling ( _
    activeSpan As SnapshotSpan _
) As SnapshotSpan
SnapshotSpan GetSpanOfPreviousSibling(
    SnapshotSpan activeSpan
)
SnapshotSpan GetSpanOfPreviousSibling(
    SnapshotSpan activeSpan
)
abstract GetSpanOfPreviousSibling : 
        activeSpan:SnapshotSpan -> SnapshotSpan
function GetSpanOfPreviousSibling(
    activeSpan : SnapshotSpan
) : SnapshotSpan

Paramètres

Valeur de retour

Type : Microsoft.VisualStudio.Text.SnapshotSpan
SnapshotSpan qui représente l'élément syntaxique frère précédent.

Notes

Si l'étendue spécifiée a une longueur nulle, le comportement est identique à celui de GetSpanOfEnclosing.

Si l'étendue d'instantanés spécifiée couvre plusieurs éléments syntaxiques, cette méthode retourne l'étendue de l'élément précédent.

Si l'étendue d'instantanés spécifiée couvre un élément syntaxique qui n'a pas d'élément frère, le comportement est identique à celui de GetSpanOfEnclosing.

Sécurité .NET Framework

Voir aussi

Référence

ITextStructureNavigator Interface

Microsoft.VisualStudio.Text.Operations, espace de noms