Partilhar via


IProjectionSnapshot.GetSourceSpans Method

Definition

Overloads

GetSourceSpans()

Gets all the source spans for the projection snapshot.

GetSourceSpans(Int32, Int32)

Gets a read-only collection of source snapshot spans starting at the specified span index. The startSpanIndex is an index into the collection of source spans, not into the characters in the text buffer.

GetSourceSpans()

Gets all the source spans for the projection snapshot.

public:
 System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::VisualStudio::Text::SnapshotSpan> ^ GetSourceSpans();
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Text.SnapshotSpan> GetSourceSpans ();
abstract member GetSourceSpans : unit -> System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Text.SnapshotSpan>
Public Function GetSourceSpans () As ReadOnlyCollection(Of SnapshotSpan)

Returns

A read-only collection of source spans of the projection snapshot, listed in the order they have in the projection snapshot. The collection may be empty.

Remarks

The collection may be empty.

Applies to

GetSourceSpans(Int32, Int32)

Gets a read-only collection of source snapshot spans starting at the specified span index. The startSpanIndex is an index into the collection of source spans, not into the characters in the text buffer.

public:
 System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::VisualStudio::Text::SnapshotSpan> ^ GetSourceSpans(int startSpanIndex, int count);
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Text.SnapshotSpan> GetSourceSpans (int startSpanIndex, int count);
abstract member GetSourceSpans : int * int -> System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Text.SnapshotSpan>
Public Function GetSourceSpans (startSpanIndex As Integer, count As Integer) As ReadOnlyCollection(Of SnapshotSpan)

Parameters

startSpanIndex
Int32

The position at which to start getting snapshot spans.

count
Int32

The number of spans to get.

Returns

A read-only collection of SnapshotSpan objects that are sources of the projection snapshot.

Exceptions

count is less than zero or count plus startSpanIndex is greater than SpanCount.

Applies to