TextDiffHierarchyEntry Class

One chunk of a hierarchy diff, with the finer diff of its two sides when there is a deeper chunking level.

public sealed class TextDiffHierarchyEntry

Constructors

NameDescription
TextDiffHierarchyEntry(TextDiffHierarchyOperation, string?, string?, IReadOnlyList<TextDiffHierarchyEntry>?)

TextDiffHierarchyEntry(TextDiffHierarchyOperation, string?, string?, IReadOnlyList<TextDiffHierarchyEntry>?)

TextDiffHierarchyEntry.cs
public TextDiffHierarchyEntry(TextDiffHierarchyOperation operation, string? oldText, string? newText, IReadOnlyList<TextDiffHierarchyEntry>? children = null)

No documentation is available.

Properties

NameDescription
ChildrenGets the diff of TextDiffHierarchyEntry.OldText against TextDiffHierarchyEntry.NewText at the next chunking level. Empty unless TextDiffHierarchyEntry.Operation is TextDiffHierarchyOperation.Replace and a finer chunker was supplied.
NewTextGets the chunk as it appears in the new text, or null when TextDiffHierarchyEntry.Operation is TextDiffHierarchyOperation.Delete.
OldTextGets the chunk as it appears in the old text, or null when TextDiffHierarchyEntry.Operation is TextDiffHierarchyOperation.Insert.
OperationGets what happened to this chunk between the two texts.

Gets the diff of TextDiffHierarchyEntry.OldText against TextDiffHierarchyEntry.NewText at the next chunking level. Empty unless TextDiffHierarchyEntry.Operation is TextDiffHierarchyOperation.Replace and a finer chunker was supplied.

public IReadOnlyList<TextDiffHierarchyEntry> Children { get; }

Gets the chunk as it appears in the new text, or null when TextDiffHierarchyEntry.Operation is TextDiffHierarchyOperation.Delete.

public string? NewText { get; }

Property value

string?

Gets the chunk as it appears in the old text, or null when TextDiffHierarchyEntry.Operation is TextDiffHierarchyOperation.Insert.

public string? OldText { get; }

Property value

string?

Gets what happened to this chunk between the two texts.

public TextDiffHierarchyOperation Operation { get; }