ITextDifferencingService.DiffSnapshotSpans Method (SnapshotSpan, SnapshotSpan, StringDifferenceOptions, Func<ITextSnapshotLine, String>)
Computes the differences between two snapshot spans, using the given difference options.
Namespace: Microsoft.VisualStudio.Text.Differencing
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaration
Function DiffSnapshotSpans ( _
left As SnapshotSpan, _
right As SnapshotSpan, _
differenceOptions As StringDifferenceOptions, _
getLineTextCallback As Func(Of ITextSnapshotLine, String) _
) As IHierarchicalDifferenceCollection
IHierarchicalDifferenceCollection DiffSnapshotSpans(
SnapshotSpan left,
SnapshotSpan right,
StringDifferenceOptions differenceOptions,
Func<ITextSnapshotLine, string> getLineTextCallback
)
IHierarchicalDifferenceCollection^ DiffSnapshotSpans(
SnapshotSpan left,
SnapshotSpan right,
StringDifferenceOptions differenceOptions,
Func<ITextSnapshotLine^, String^>^ getLineTextCallback
)
abstract DiffSnapshotSpans :
left:SnapshotSpan *
right:SnapshotSpan *
differenceOptions:StringDifferenceOptions *
getLineTextCallback:Func<ITextSnapshotLine, string> -> IHierarchicalDifferenceCollection
function DiffSnapshotSpans(
left : SnapshotSpan,
right : SnapshotSpan,
differenceOptions : StringDifferenceOptions,
getLineTextCallback : Func<ITextSnapshotLine, String>
) : IHierarchicalDifferenceCollection
Parameters
left
Type: Microsoft.VisualStudio.Text.SnapshotSpanhe left span. In most cases this is from an "old" snapshot.
right
Type: Microsoft.VisualStudio.Text.SnapshotSpanThe right span. In most cases this is from a "new" snapshot.
differenceOptions
Type: Microsoft.VisualStudio.Text.Differencing.StringDifferenceOptionsThe options to use.
getLineTextCallback
Type: Func<ITextSnapshotLine, String>A callback for retrieving the text of snapshot lines (when performing differencing at the line level) that can optionally filter/modify the text, as long as it doesn't introduce line breaks (i.e. split the given line into multiple lines).
Return Value
Type: Microsoft.VisualStudio.Text.Differencing.IHierarchicalDifferenceCollection
A hierarchical collection of differences.
.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.