ITextViewLineCollection.GetTextElementSpan-Methode
Ruft die Spanne ab, deren Textelementspanne die angegebene Pufferposition enthält.
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Declaration
Function GetTextElementSpan ( _
bufferPosition As SnapshotPoint _
) As SnapshotSpan
SnapshotSpan GetTextElementSpan(
SnapshotPoint bufferPosition
)
SnapshotSpan GetTextElementSpan(
SnapshotPoint bufferPosition
)
abstract GetTextElementSpan :
bufferPosition:SnapshotPoint -> SnapshotSpan
function GetTextElementSpan(
bufferPosition : SnapshotPoint
) : SnapshotSpan
Parameter
bufferPosition
Typ: Microsoft.VisualStudio.Text.SnapshotPointDie Pufferposition.
Rückgabewert
Typ: Microsoft.VisualStudio.Text.SnapshotSpan
Die SnapshotSpan, die dem angegebenen Textelementindex entspricht.
Ausnahmen
Ausnahme | Bedingung |
---|---|
ArgumentOutOfRangeException | bufferPosition entspricht keiner Position in dieser Zeile. |
.NET Framework-Sicherheit
- Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter Verwenden von Bibliotheken aus teilweise vertrauenswürdigem Code.