ITextStructureNavigator.GetSpanOfPreviousSibling(SnapshotSpan) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the span of the previous sibling syntactic element of the specified snapshot span. If the specified span has zero length, then the behavior is the same as that of GetSpanOfEnclosing(SnapshotSpan).
public:
Microsoft::VisualStudio::Text::SnapshotSpan GetSpanOfPreviousSibling(Microsoft::VisualStudio::Text::SnapshotSpan activeSpan);
Microsoft::VisualStudio::Text::SnapshotSpan GetSpanOfPreviousSibling(Microsoft::VisualStudio::Text::SnapshotSpan activeSpan);
public Microsoft.VisualStudio.Text.SnapshotSpan GetSpanOfPreviousSibling (Microsoft.VisualStudio.Text.SnapshotSpan activeSpan);
abstract member GetSpanOfPreviousSibling : Microsoft.VisualStudio.Text.SnapshotSpan -> Microsoft.VisualStudio.Text.SnapshotSpan
Public Function GetSpanOfPreviousSibling (activeSpan As SnapshotSpan) As SnapshotSpan
Parameters
- activeSpan
- SnapshotSpan
The SnapshotSpan from which to get the span of the previous sibling syntactic element.
Returns
A SnapshotSpan that represents the previous sibling syntactic element. If the specified snapshot span covers multiple syntactic elements, then this method returns the span of the previous element. If the specified snapshot span covers a syntactic element that does not have a sibling element, then the behavior is the same as that of GetSpanOfEnclosing(SnapshotSpan).
Remarks
If the specified 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 previous element.
If the specified snapshot span covers a syntactic element that does not have a sibling element, then the behavior is the same as that of GetSpanOfEnclosing.