IProjectionBuffer.InsertSpan Method (Int32, ITrackingSpan)
Inserts a tracking span into the list of source spans.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
- Type: Int32
The position at which to insert spanToInsert.
- Type: Microsoft.VisualStudio.Text.ITrackingSpan
The span to insert.
Return ValueType: Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot
spanToInsert is null.
position is less than zero or greater than the number of spans.
spanToInsert would cause a duplicated projection, or spanToInsert is EdgeInclusive and does not cover its entire buffer, or is EdgePositive and does not abut the end of its buffer, or is EdgeNegative and does not abut the beginning of its buffer.
(These checks are not performed if the projection buffer was created with the PermissiveEdgeInclusiveSourceSpans option.)
Or: adding the text buffer containing spanToInsert would create a cycle among a set of projection buffers.
- 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.