次の方法で共有


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

'宣言
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.

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

See Also

Reference

IProjectionBuffer Interface

InsertSpan Overload

Microsoft.VisualStudio.Text.Projection Namespace