IProjectionBufferFactoryService.CreateProjectionBuffer Method (IProjectionEditResolver, IList<Object>, ProjectionBufferOptions)

Creates an IProjectionBuffer object with the default projection IContentType and the specified list of source spans.

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

Syntax

声明
Function CreateProjectionBuffer ( _
    projectionEditResolver As IProjectionEditResolver, _
    sourceSpans As IList(Of Object), _
    options As ProjectionBufferOptions _
) As IProjectionBuffer
IProjectionBuffer CreateProjectionBuffer(
    IProjectionEditResolver projectionEditResolver,
    IList<Object> sourceSpans,
    ProjectionBufferOptions options
)
IProjectionBuffer^ CreateProjectionBuffer(
    IProjectionEditResolver^ projectionEditResolver, 
    IList<Object^>^ sourceSpans, 
    ProjectionBufferOptions options
)
abstract CreateProjectionBuffer : 
        projectionEditResolver:IProjectionEditResolver * 
        sourceSpans:IList<Object> * 
        options:ProjectionBufferOptions -> IProjectionBuffer 
function CreateProjectionBuffer(
    projectionEditResolver : IProjectionEditResolver, 
    sourceSpans : IList<Object>, 
    options : ProjectionBufferOptions
) : IProjectionBuffer

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.Projection.IProjectionBuffer
A non-null projection buffer.

Exceptions

Exception Condition
ArgumentNullException

sourceSpans or any of its elements is nulla null reference (Nothing in Visual Basic).

ArgumentException

An element of sourceSpans is neither a string nor an ITrackingSpan.

-or-

A tracking span in sourceSpans 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.

-or-

Any of the tracking spans in sourceSpans overlap.

.NET Framework Security

See Also

Reference

IProjectionBufferFactoryService Interface

CreateProjectionBuffer Overload

Microsoft.VisualStudio.Text.Projection Namespace