8 public partial class RudolphTableEntry : ObservableObject, IEquatable<RudolphTableEntry>, ICloneable
25 if (other ==
null) {
return; }
26 this.Gender = other.Gender;
28 this.IsOpenAge = other.IsOpenAge;
29 this.SwimmingStyle = other.SwimmingStyle;
30 this.Distance = other.Distance;
31 this.RudolphScore = other.RudolphScore;
32 this.Time = other.Time;
39 #region Basic properties
87 #region Equality, HashCode, ToString, Clone
94 public override bool Equals(
object obj)
95 => obj is
RudolphTableEntry c && (c.Gender, c.Age, c.SwimmingStyle, c.Distance, c.RudolphScore, c.Time).
Equals((Gender, Age,
SwimmingStyle, Distance, RudolphScore, Time));
112 => base.GetHashCode();
119 => $
"{Gender}, Age: {(IsOpenAge ? "open age
" : Age)}, {Distance}m {SwimmingStyle}, Rudolph score: {RudolphScore}, Time: {Time}";
byte _age
Age for this RudolphTableEntry
override string ToString()
Returns a string that represents the current object.
TimeSpan _time
Time for this RudolphTableEntry
bool _isOpenAge
Is open age attribute for this RudolphTableEntry.
object Clone()
Create a new object that has the same property values than this one.
byte _rudolphScore
Rudolph score for this RudolphTableEntry (between 1 and 20)
RudolphTableEntry()
Constructor for a new RudolphTableEntry object.
ushort _distance
Distance in meters for this RudolphTableEntry (e.g.
Genders _gender
Genders for this RudolphTableEntry
override bool Equals(object obj)
Compare if two RudolphTableEntry are equal.
SwimmingStyles _swimmingStyle
SwimmingStyles for this RudolphTableEntry
bool Equals(RudolphTableEntry other)
Indicates wheather the current object is equal to another object of the same type.
RudolphTableEntry(RudolphTableEntry other)
Clone constructor for a RudolphTableEntry object.
override int GetHashCode()
Serves as the default hash function.