Beispiel #1
0
 public bool Equals(DiffElement <T> other)
 {
     return
         (ElementIndexFromCollection1.Equals(other.ElementIndexFromCollection1) &&
          ElementFromCollection1.Equals(other.ElementFromCollection1) &&
          ElementIndexFromCollection2.Equals(other.ElementIndexFromCollection2) &&
          ElementFromCollection2.Equals(other.ElementFromCollection2) &&
          Operation == other.Operation);
 }
        private T GetElement(DiffElement <T> diffElement)
        {
            if (diffElement.ElementFromCollection1.HasValue)
            {
                return(diffElement.ElementFromCollection1.Value);
            }

            if (diffElement.ElementFromCollection2.HasValue)
            {
                return(diffElement.ElementFromCollection2.Value);
            }

            return(default(T));
        }
 public int GetHashCode(DiffElement <T> obj)
 {
     return(_Comparer.GetHashCode(GetElement(obj)));
 }
 public bool Equals(DiffElement <T> x, DiffElement <T> y)
 {
     return(_Comparer.Equals(GetElement(x), GetElement(y)));
 }