TextDiffEntry Struct
public readonly struct TextDiffEntry : IEquatable<TextDiffEntry>No documentation is available.
- Implements
Constructors
| Name | Description |
|---|---|
| TextDiffEntry(TextDiffOperation, string) | |
| TextDiffEntry(TextDiffOperation, string?, string?) |
TextDiffEntry overloads
TextDiffEntry(TextDiffOperation, string)
TextDiffEntry.cspublic TextDiffEntry(TextDiffOperation operation, string text)Parameters
operationTextDiffOperationtextstring
No documentation is available.
TextDiffEntry(TextDiffOperation, string?, string?)
TextDiffEntry.cspublic TextDiffEntry(TextDiffOperation operation, string? oldText, string? newText)Parameters
operationTextDiffOperationoldTextstring?newTextstring?
No documentation is available.
Properties
| Name | Description |
|---|---|
| NewText | Gets the chunk as it appears in the new text, or null when TextDiffEntry.Operation is TextDiffOperation.Delete. |
| OldText | Gets the chunk as it appears in the old text, or null when TextDiffEntry.Operation is TextDiffOperation.Insert. |
| Operation | |
| Text | Gets TextDiffEntry.OldText, or TextDiffEntry.NewText when TextDiffEntry.Operation is TextDiffOperation.Insert. |
NewText
TextDiffEntry.csGets the chunk as it appears in the new text, or null when TextDiffEntry.Operation is TextDiffOperation.Delete.
public string? NewText { get; }Property value
Remarks
When an option such as TextDiffOptions.IgnoreCase or TextDiffOptions.IgnoreWhitespace makes two different chunks compare equal, an TextDiffOperation.Equal entry keeps both sides: TextDiffEntry.OldText and TextDiffEntry.NewText then differ. Append TextDiffEntry.NewText for TextDiffOperation.Equal and TextDiffOperation.Insert entries to rebuild the new text.
OldText
TextDiffEntry.csGets the chunk as it appears in the old text, or null when TextDiffEntry.Operation is TextDiffOperation.Insert.
public string? OldText { get; }Property value
Operation
TextDiffEntry.csText
TextDiffEntry.csGets TextDiffEntry.OldText, or TextDiffEntry.NewText when TextDiffEntry.Operation is TextDiffOperation.Insert.
public string Text { get; }Property value
Remarks
For an TextDiffOperation.Equal entry this is the chunk from the old text, which is not necessarily the chunk from the new text. Use TextDiffEntry.OldText and TextDiffEntry.NewText to rebuild either side of the diff.
Methods
| Name | Description |
|---|---|
| Equals(TextDiffEntry) | |
| Equals(object?) | |
| GetHashCode() | |
| ToString() |
Equals overloads
Equals(TextDiffEntry)
TextDiffEntry.cspublic bool Equals(TextDiffEntry other)No documentation is available.
Equals(object?)
TextDiffEntry.csGetHashCode()
TextDiffEntry.csToString()
TextDiffEntry.csOperators
| Name | Description |
|---|---|
| operator ==(TextDiffEntry, TextDiffEntry) | |
| operator !=(TextDiffEntry, TextDiffEntry) |
operator ==(TextDiffEntry, TextDiffEntry)
TextDiffEntry.cspublic static bool operator ==(TextDiffEntry left, TextDiffEntry right)No documentation is available.
operator !=(TextDiffEntry, TextDiffEntry)
TextDiffEntry.cspublic static bool operator !=(TextDiffEntry left, TextDiffEntry right)No documentation is available.