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)
Syntax
'Déclaration
Function InsertSpan ( _
position As Integer, _
literalSpanToInsert As String _
) As IProjectionSnapshot
IProjectionSnapshot InsertSpan(
int position,
string literalSpanToInsert
)
IProjectionSnapshot^ InsertSpan(
int position,
String^ literalSpanToInsert
)
abstract InsertSpan :
position:int *
literalSpanToInsert:string -> IProjectionSnapshot
function InsertSpan(
position : int,
literalSpanToInsert : String
) : IProjectionSnapshot
Parameters
- position
Type: System.Int32
The position at which to insert literalSpanToInsert.
- literalSpanToInsert
Type: System.String
The string to insert.
Return Value
Type: Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot
An IProjectionSnapshot.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | literalSpanToInsert is nulla null reference (Nothing in Visual Basic). 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. |
.NET Framework Security
- 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.