Vereinsmeisterschaften  22aa7800eae54b428d40e835886cefe1fdefdfdf
This is a software that can be used to manage the internal competition of the swimming club Illertissen called "Vereinsmeisterschaften".
Loading...
Searching...
No Matches
RacesVariantFullEqualityComparer.cs
2{
8 public class RacesVariantFullEqualityComparer : IEqualityComparer<RacesVariant>
9 {
17 {
18 if (ReferenceEquals(x, y)) return true;
19 if (ReferenceEquals(x, null)) return false;
20 if (ReferenceEquals(y, null)) return false;
21 if (x.GetType() != y.GetType()) return false;
22
23 return x.Score == y.Score && x.Races.SequenceEqual(y.Races);
24 }
25
31 public int GetHashCode(RacesVariant obj)
32 => obj == null ? 0 : (obj.Races, obj.Score).GetHashCode();
33 }
34}
Comparer that only uses most properties of a RacesVariant to determine equality:
int GetHashCode(RacesVariant obj)
Get the hash code for a RacesVariant object based on basic properties.
bool Equals(RacesVariant x, RacesVariant y)
Check if two RacesVariant objects are equal based on basic properties.
Class that represents a combination variant of all single races.
ObservableCollection< Race > Races
List with races.