IProjectionSnapshot.GetSourceSpans Method (Int32, Int32)
Gets a read-only collection of source snapshot spans starting at the specified location of the span.
Namespace: Microsoft.VisualStudio.Text.Projection
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaration
Function GetSourceSpans ( _
startSpanIndex As Integer, _
count As Integer _
) As ReadOnlyCollection(Of SnapshotSpan)
ReadOnlyCollection<SnapshotSpan> GetSourceSpans(
int startSpanIndex,
int count
)
ReadOnlyCollection<SnapshotSpan>^ GetSourceSpans(
int startSpanIndex,
int count
)
abstract GetSourceSpans :
startSpanIndex:int *
count:int -> ReadOnlyCollection<SnapshotSpan>
function GetSourceSpans(
startSpanIndex : int,
count : int
) : ReadOnlyCollection<SnapshotSpan>
Parameters
startSpanIndex
Type: System.Int32The position at which to start getting snapshot spans. This is an index into the collection of source spans, not into the characters in the text buffer.
count
Type: System.Int32The number of spans to get.
Return Value
Type: System.Collections.ObjectModel.ReadOnlyCollection<SnapshotSpan>
A read-only collection of SnapshotSpan objects that are sources of the projection snapshot.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | startSpanIndex is less than zero or greater than the number of spans. -or- count is less than zero or count plus startSpanIndex is greater than of the number of spans. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.