Partilhar via


IProjectionBuffer.InsertSpans(Int32, IList<Object>) Method

Definition

Inserts a list of ITrackingSpan objects and/or literal strings into the list of source spans in the order in which they appear in the list.

public:
 Microsoft::VisualStudio::Text::Projection::IProjectionSnapshot ^ InsertSpans(int position, System::Collections::Generic::IList<System::Object ^> ^ spansToInsert);
public Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot InsertSpans (int position, System.Collections.Generic.IList<object> spansToInsert);
abstract member InsertSpans : int * System.Collections.Generic.IList<obj> -> Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot
Public Function InsertSpans (position As Integer, spansToInsert As IList(Of Object)) As IProjectionSnapshot

Parameters

position
Int32

The position at which to insert the spans.

spansToInsert
IList<Object>

The list of spans to insert.

Returns

An IProjectionSnapshot.

Exceptions

position is less than zero or greater than SpanCount.

spansToInsert is null or a span in that list is null.

Adding one of the text buffers containing any of the spansToInsert would create a cycle among a set of projection vuffers by virtue of the SourceBuffer relationship.

Applies to