IProjectionBuffer.InsertSpan Method (Int32, String)

 

Inserts a literal string into the list of source spans.

Namespace:   Microsoft.VisualStudio.Text.Projection
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

IProjectionSnapshot InsertSpan(
	int position,
	string literalSpanToInsert
)

Parameters

position
Type: System.Int32

The position at which to insert literalSpanToInsert.

literalSpanToInsert
Type: System.String

The string to insert.

Exception Condition
ArgumentNullException

literalSpanToInsert is null.

These checks are not performed if the projection buffer was created with the PermissiveEdgeInclusiveSourceSpans option.

ArgumentOutOfRangeException

position is less than zero or greater than the number of spans.

Return to top
Show: