public int Compare(Employee x, Employee y) { var firstCompareResult = FirstComparer.Compare(x, y); if (firstCompareResult != 0) { return(firstCompareResult); } return(SecondComparer.Compare(x, y)); }
public int Compare(TSource element, TSource minElement) { var firstCompareResult = FirstComparer.Compare(element, minElement); if (firstCompareResult != 0) { return(firstCompareResult); } return(SecondComparer.Compare(element, minElement)); }
public virtual int Compare(T x, T y) { if (ReferenceEquals(x, y)) { return(0); } if (x == null) { return(1); } if (y == null) { return(-1); } int n = FirstComparer.Compare(x, y); return(n != 0 ? n : SecondComparer.Compare(x, y)); }
public bool Equals(TaggedUnion <TFirst, TSecond> other) { if (tag != other.tag) { return(false); } if (tag == Tag.First) { return(FirstComparer.Equals(first, other.first)); } if (tag == Tag.Second) { return(SecondComparer.Equals(second, other.second)); } return(true); }
public int Compare(TType x, TType y) { var firstCompareResult = FirstComparer.Compare(x, y); return(firstCompareResult != 0 ? firstCompareResult : SecondComparer.Compare(x, y)); }
public int Compare(Employee x, Employee y) { var firstCompareResult = FirstComparer.Compare(x, y); return(firstCompareResult == 0 ? SecondComparer.Compare(x, y) : firstCompareResult); }
public int Compare(Employee x, Employee y) { var firstCompareResult = FirstComparer.Compare(x, y); return(firstCompareResult != 0 ? firstCompareResult : SecondComparer.Compare(x, y)); }