IProjectionBuffer.InsertSpans(Int32, IList<Object>) 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.
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.
Returns
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.