Struct Diff<T>
- Namespace
- Pixie
- Assembly
- Pixie.dll
Represents the changes required to turn one sequence into another.
public struct Diff<T> : IEquatable<Diff<T>>
Type Parameters
T
- Implements
-
IEquatable<Diff<T>>
- Inherited Members
Constructors
Diff(IReadOnlyList<DiffElement<T>>)
Creates a diff from a sequence of diff elements.
public Diff(IReadOnlyList<DiffElement<T>> elements)
Parameters
elementsIReadOnlyList<DiffElement<T>>The diff elements.
Properties
Elements
Gets the elements in this diff.
public readonly IReadOnlyList<DiffElement<T>> Elements { get; }
Property Value
- IReadOnlyList<DiffElement<T>>
The diff elements.
NewSequence
Recreates the new sequence, that is, the sequence produced by applying this diff.
public IReadOnlyList<T> NewSequence { get; }
Property Value
- IReadOnlyList<T>
The new sequence.
OldSequence
Recreates the old sequence, that is, the sequence prior to applying this diff.
public IReadOnlyList<T> OldSequence { get; }
Property Value
- IReadOnlyList<T>
The old sequence.
Methods
Equals(Diff<T>)
Tests if this diff is the same as another diff.
public bool Equals(Diff<T> other)
Parameters
otherDiff<T>The other diff.
Returns
- bool
trueif this diff equals the other diff; otherwise,false.
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()