Share via


IProjectionBuffer.DeleteSpans Method

Deletes a sequence of source spans from the projection buffer.

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

Syntax

'Declaration
Function DeleteSpans ( _
    position As Integer, _
    spansToDelete As Integer _
) As IProjectionSnapshot
IProjectionSnapshot DeleteSpans(
    int position,
    int spansToDelete
)
IProjectionSnapshot^ DeleteSpans(
    int position, 
    int spansToDelete
)
abstract DeleteSpans : 
        position:int * 
        spansToDelete:int -> IProjectionSnapshot 
function DeleteSpans(
    position : int, 
    spansToDelete : int
) : IProjectionSnapshot

Parameters

  • position
    Type: System.Int32
    The position at which to begin deleting spans.
  • spansToDelete
    Type: System.Int32
    The number of spans to delete.

Return Value

Type: Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot
An IProjectionSnapshot.

Exceptions

Exception Condition
ArgumentOutOfRangeException

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

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

.NET Framework Security

See Also

Reference

IProjectionBuffer Interface

Microsoft.VisualStudio.Text.Projection Namespace