次の方法で共有


IDifferenceBufferFactoryService3.CreateDifferenceBuffer Method

Definition

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

public Microsoft.VisualStudio.Text.Differencing.IDifferenceBuffer2 CreateDifferenceBuffer (Microsoft.VisualStudio.Text.ITextDataModel innerLeftDataModel, Microsoft.VisualStudio.Text.ITextDataModel rightDataModel, Microsoft.VisualStudio.Text.Differencing.StringDifferenceOptions options, bool disableEditing, Microsoft.VisualStudio.Text.Projection.IProjectionBuffer leftEditBuffer, Action<Microsoft.VisualStudio.Text.Projection.IProjectionBuffer,Microsoft.VisualStudio.Text.Differencing.IDifferenceBuffer2,Microsoft.VisualStudio.Text.ITextDataModel> updateLeftProjection, Microsoft.VisualStudio.Text.Projection.IProjectionBuffer rightEditBuffer, bool fixedBaseLeftBuffer);
abstract member CreateDifferenceBuffer : Microsoft.VisualStudio.Text.ITextDataModel * Microsoft.VisualStudio.Text.ITextDataModel * Microsoft.VisualStudio.Text.Differencing.StringDifferenceOptions * bool * Microsoft.VisualStudio.Text.Projection.IProjectionBuffer * Action<Microsoft.VisualStudio.Text.Projection.IProjectionBuffer, Microsoft.VisualStudio.Text.Differencing.IDifferenceBuffer2, Microsoft.VisualStudio.Text.ITextDataModel> * Microsoft.VisualStudio.Text.Projection.IProjectionBuffer * bool -> Microsoft.VisualStudio.Text.Differencing.IDifferenceBuffer2
Public Function CreateDifferenceBuffer (innerLeftDataModel As ITextDataModel, rightDataModel As ITextDataModel, options As StringDifferenceOptions, disableEditing As Boolean, leftEditBuffer As IProjectionBuffer, updateLeftProjection As Action(Of IProjectionBuffer, IDifferenceBuffer2, ITextDataModel), rightEditBuffer As IProjectionBuffer, fixedBaseLeftBuffer As Boolean) As IDifferenceBuffer2

Parameters

innerLeftDataModel
ITextDataModel

The data model for the left buffer. This can be null.

rightDataModel
ITextDataModel

The right (new, after) buffer's data model.

options
StringDifferenceOptions

The options to use in computing differences between the buffers.

disableEditing
Boolean

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

leftEditBuffer
IProjectionBuffer

The buffer that will be used as the left edit buffer of a containing diff view.

updateLeftProjection
Action<IProjectionBuffer,IDifferenceBuffer2,ITextDataModel>

Called when the left data model changes to update the left edit buffer's projection buffer. Can be null if fixedBaseLeftBuffer is true.

rightEditBuffer
IProjectionBuffer

The buffer that will be used as the right edit buffer of a containing diff view.

fixedBaseLeftBuffer
Boolean

Allows, if false, the BaseLeftBuffer can be changed.

Returns

Remarks

If disableEditingif true, then the caller is responsible for ensuring rightEditBuffer is covered by a read-only region.

updateLeftProjectionis only called when LeftDataModel changes.

The other difference buffer factory methods all assume that the created DifferenceBuffer will be used to create a DifferenceView that displays all of the buffers defined in the left and right data models. This factory method is used when you want a difference viewer that displays only part of the buffers: the supplied leftEditBuffer and rightEditBuffer define the spans that will be displayed in the difference viewer. updateLeftProjection is used to adjust the left edit buffer if the left data model changes.

Applies to