IProjectionBufferFactoryService.CreateProjectionBuffer Method (IProjectionEditResolver, IList<Object>, ProjectionBufferOptions, IContentType)
Creates an IProjectionBuffer object with a specified IContentType and the specified list of ITrackingSpan objects and/or literal strings.
Namespace: Microsoft.VisualStudio.Text.Projection
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaração
Function CreateProjectionBuffer ( _
projectionEditResolver As IProjectionEditResolver, _
sourceSpans As IList(Of Object), _
options As ProjectionBufferOptions, _
contentType As IContentType _
) As IProjectionBuffer
IProjectionBuffer CreateProjectionBuffer(
IProjectionEditResolver projectionEditResolver,
IList<Object> sourceSpans,
ProjectionBufferOptions options,
IContentType contentType
)
IProjectionBuffer^ CreateProjectionBuffer(
IProjectionEditResolver^ projectionEditResolver,
IList<Object^>^ sourceSpans,
ProjectionBufferOptions options,
IContentType^ contentType
)
abstract CreateProjectionBuffer :
projectionEditResolver:IProjectionEditResolver *
sourceSpans:IList<Object> *
options:ProjectionBufferOptions *
contentType:IContentType -> IProjectionBuffer
function CreateProjectionBuffer(
projectionEditResolver : IProjectionEditResolver,
sourceSpans : IList<Object>,
options : ProjectionBufferOptions,
contentType : IContentType
) : IProjectionBuffer
Parameters
- projectionEditResolver
Type: Microsoft.VisualStudio.Text.Projection.IProjectionEditResolver
The conflict resolver for this IProjectionBuffer. May be nulla null reference (Nothing in Visual Basic).
- sourceSpans
Type: System.Collections.Generic.IList<Object>
The initial set of source spans for the IProjectionBuffer.
- options
Type: Microsoft.VisualStudio.Text.Projection.ProjectionBufferOptions
Options for this buffer.
- contentType
Type: Microsoft.VisualStudio.Utilities.IContentType
The IContentType for the new IProjectionBuffer.
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. These checks are not performed if the projection buffer was created with the PermissiveEdgeInclusiveSourceSpans option.) -or- Some of the tracking spans in sourceSpans overlap. |
.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.
See Also
Reference
IProjectionBufferFactoryService Interface