IDifferenceBuffer Interface

 

A difference buffer constantly computes the differences between two ITextBuffer objects, providing an IProjectionBuffer, InlineBuffer, that contains the differences between the two ITextBuffer objects in an inline difference.

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

public interface IDifferenceBuffer : IDisposable, IPropertyOwner

NameDescription
System_CAPS_pubpropertyBaseLeftBuffer

Gets or sets the source of the left buffer in the difference.

System_CAPS_pubpropertyBaseRightBuffer

Gets or sets the source of the right buffer in the difference.

System_CAPS_pubpropertyCurrentInlineBufferSnapshot

Gets or sets the snapshot of the InlineBuffer that corresponds to the state at which CurrentSnapshotDifference is current.

System_CAPS_pubpropertyCurrentSnapshotDifference

Gets or sets the currently-used snapshot difference that matches up with the current snapshot of the InlineBuffer.

System_CAPS_pubpropertyDifferenceOptions

Gets or sets the options used in differencing the two buffers. These options are used in calls to the IHierarchicalStringDifferenceService that performs the actual comparison.

System_CAPS_pubpropertyInlineBuffer

Gets or sets the top-level buffer, which contains the differences combined.

System_CAPS_pubpropertyIsEditingDisabled

Determines whether editing is disabled in this IDifferenceBuffer.

System_CAPS_pubpropertyLeftBuffer

Gets or sets the left buffer of the difference.

System_CAPS_pubpropertyOptions

Gets or sets the general difference buffer options DifferenceBufferOptions).

System_CAPS_pubpropertyProperties

(Inherited from IPropertyOwner.)

System_CAPS_pubpropertyRightBuffer

Gets or sets the right buffer in the difference.

NameDescription
System_CAPS_pubmethodAddIgnoreDifferencePredicate(IgnoreDifferencePredicate)

Add a predicate to selectively ignore differences.

System_CAPS_pubmethodAddSnapshotLineTransform(SnapshotLineTransform)

Add a custom SnapshotLineTransform, which can modify lines of text before they are compared.

System_CAPS_pubmethodDispose()

(Inherited from IDisposable.)

System_CAPS_pubmethodRemoveIgnoreDifferencePredicate(IgnoreDifferencePredicate)

Remove a predicate previously added with AddIgnoreDifferencePredicate.

System_CAPS_pubmethodRemoveSnapshotLineTransform(SnapshotLineTransform)

Remove a custom SnapshotLineTransform previously added with AddSnapshotLineTransform

NameDescription
System_CAPS_pubeventSnapshotDifferenceChanged

Occurs when the CurrentSnapshotDifference and InlineBuffer have changed.

System_CAPS_pubeventSnapshotDifferenceChanging

Occurs immediately before the CurrentSnapshotDifference and InlineBuffer are updated.

The differences are computed on a background thread in response to various changes (text change, options changing, etc.), though all of the events around differencing, like SnapshotDifferenceChanged, will be raised on the thread that owns the LeftBuffer and RightBuffer (generally, the UI thread).

Because the differences are computed asynchronously, the CurrentSnapshotDifference may be behind the current versions of any of the buffers, and will be null before the first difference is computed.

Return to top
Show: