Partager via


IDifferenceBufferFactoryService.CreateDifferenceBuffer Method (ITextBuffer, ITextBuffer, StringDifferenceOptions, Boolean, Boolean, Boolean)

Creates an IDifferenceBuffer for the given left and right buffers and with the given difference options.

Namespace:  Microsoft.VisualStudio.Text.Differencing
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

Syntax

'Declaration
Function CreateDifferenceBuffer ( _
    leftBaseBuffer As ITextBuffer, _
    rightBaseBuffer As ITextBuffer, _
    options As StringDifferenceOptions, _
    disableEditing As Boolean, _
    wrapLeftBuffer As Boolean, _
    wrapRightBuffer As Boolean _
) As IDifferenceBuffer
IDifferenceBuffer CreateDifferenceBuffer(
    ITextBuffer leftBaseBuffer,
    ITextBuffer rightBaseBuffer,
    StringDifferenceOptions options,
    bool disableEditing,
    bool wrapLeftBuffer,
    bool wrapRightBuffer
)
IDifferenceBuffer^ CreateDifferenceBuffer(
    ITextBuffer^ leftBaseBuffer, 
    ITextBuffer^ rightBaseBuffer, 
    StringDifferenceOptions options, 
    bool disableEditing, 
    bool wrapLeftBuffer, 
    bool wrapRightBuffer
)
abstract CreateDifferenceBuffer : 
        leftBaseBuffer:ITextBuffer * 
        rightBaseBuffer:ITextBuffer * 
        options:StringDifferenceOptions * 
        disableEditing:bool * 
        wrapLeftBuffer:bool * 
        wrapRightBuffer:bool -> IDifferenceBuffer
function CreateDifferenceBuffer(
    leftBaseBuffer : ITextBuffer, 
    rightBaseBuffer : ITextBuffer, 
    options : StringDifferenceOptions, 
    disableEditing : boolean, 
    wrapLeftBuffer : boolean, 
    wrapRightBuffer : boolean
) : IDifferenceBuffer

Parameters

  • disableEditing
    Type: Boolean

    If true, disable editing in the right and inline views.

  • wrapLeftBuffer
    Type: Boolean

    If true, create a read-only projection of leftBaseBuffe r (which will prevent that buffer from being modified through the difference buffers).

  • wrapRightBuffer
    Type: Boolean

    If true and editing is disabled, create a read-only projection of rightBaseBuffer (which will prevent that buffer from being modified through the difference buffers).

Return Value

Type: Microsoft.VisualStudio.Text.Differencing.IDifferenceBuffer
Returns IDifferenceBuffer.

Remarks

If disableEditing is false, then wrapRightBuffer is ignored (and the right buffer will not be wrapped). If wrapLeftBuffer is false, then the caller of this method is responsible for making sure leftBaseBuffer is read-only. If disableEditing is true and wrapRightBuffer is false, then the caller of this method is responsible for making sure rightBaseBuffer is read-only.

.NET Framework Security

See Also

Reference

IDifferenceBufferFactoryService Interface

CreateDifferenceBuffer Overload

Microsoft.VisualStudio.Text.Differencing Namespace