IProjectionSnapshot.GetSourceSpans 方法 (Int32, Int32)
取得來源範圍的指定位置開始的快照集 span 的唯讀集合。
命名空間: Microsoft.VisualStudio.Text.Projection
組件: Microsoft.VisualStudio.Text.Data (在 Microsoft.VisualStudio.Text.Data.dll 中)
語法
'宣告
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>
參數
startSpanIndex
類型:Int32要開始取得快照延伸的位置。 這是一個索引至來源 span 的集合,不能進入文字緩衝區中的字元。
count
類型:Int32要取得的延伸數目。
傳回值
類型:ReadOnlyCollection<SnapshotSpan>
SnapshotSpan 物件的唯讀集合,這些物件是投影快照的來源。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentOutOfRangeException | startSpanIndex小於零或大於 span 的數目。 -或- count小於零或count加上startSpanIndex大於 span 的數目。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。