UnifiedDiffLine Struct

A line of a UnifiedDiffHunk: an unchanged line of context, a deleted line or an inserted line.

public readonly struct UnifiedDiffLine : IEquatable<UnifiedDiffLine>
Implements

Properties

NameDescription
OperationGets TextDiffOperation.Equal for a line of context (prefix ' '), TextDiffOperation.Delete for a deleted line ('-') or TextDiffOperation.Insert for an inserted line ('+').
TextGets the line without its prefix. It ends with "\n", unless it is the last line of a text that does not end with a line feed (\ No newline at end of file).

Gets TextDiffOperation.Equal for a line of context (prefix ' '), TextDiffOperation.Delete for a deleted line ('-') or TextDiffOperation.Insert for an inserted line ('+').

public TextDiffOperation Operation { get; }

Property value

TextDiffOperation

Gets the line without its prefix. It ends with "\n", unless it is the last line of a text that does not end with a line feed (\ No newline at end of file).

public string Text { get; }

Property value

string

Methods

NameDescription
Equals(UnifiedDiffLine)
Equals(object?)
GetHashCode()
ToString()

Equals overloads

Equals(UnifiedDiffLine)

UnifiedDiffLine.cs
public bool Equals(UnifiedDiffLine other)
Parameters
other UnifiedDiffLine
Returns

bool

No documentation is available.

Equals(object?)

UnifiedDiffLine.cs
public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

UnifiedDiffLine.cs
public override int GetHashCode()

Returns

int

No documentation is available.

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(UnifiedDiffLine, UnifiedDiffLine)
operator !=(UnifiedDiffLine, UnifiedDiffLine)

operator ==(UnifiedDiffLine, UnifiedDiffLine)

UnifiedDiffLine.cs
public static bool operator ==(UnifiedDiffLine left, UnifiedDiffLine right)

Parameters

left UnifiedDiffLine
right UnifiedDiffLine

Returns

bool

No documentation is available.

operator !=(UnifiedDiffLine, UnifiedDiffLine)

UnifiedDiffLine.cs
public static bool operator !=(UnifiedDiffLine left, UnifiedDiffLine right)

Parameters

left UnifiedDiffLine
right UnifiedDiffLine

Returns

bool

No documentation is available.