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
PersonBasicEqualityComparer.cs
1
namespace
Vereinsmeisterschaften.Core.Models
2
{
10
public
class
PersonBasicEqualityComparer
: IEqualityComparer<Person>
11
{
18
public
bool
Equals
(
Person
x,
Person
y)
19
{
20
if
(ReferenceEquals(x, y))
return
true
;
21
if
(ReferenceEquals(x,
null
))
return
false
;
22
if
(ReferenceEquals(y,
null
))
return
false
;
23
if
(x.GetType() != y.GetType())
return
false
;
24
25
return
(x.
Name
.ToUpper(), x.
FirstName
.ToUpper(), x.
Gender
, x.
BirthYear
).Equals((y.
Name
.ToUpper(), y.
FirstName
.ToUpper(), y.
Gender
, y.
BirthYear
));
26
}
27
33
public
int
GetHashCode
(
Person
obj)
34
=> obj ==
null
? 0 : (obj.Name.ToUpper(), obj.FirstName.ToUpper(), obj.Gender, obj.BirthYear).GetHashCode();
35
}
36
}
Vereinsmeisterschaften.Core.Models.PersonBasicEqualityComparer
Comparer that only uses the most basic properties of a Person to determine equality:
Definition
PersonBasicEqualityComparer.cs:11
Vereinsmeisterschaften.Core.Models.PersonBasicEqualityComparer.Equals
bool Equals(Person x, Person y)
Check if two Person objects are equal based on basic properties.
Definition
PersonBasicEqualityComparer.cs:18
Vereinsmeisterschaften.Core.Models.PersonBasicEqualityComparer.GetHashCode
int GetHashCode(Person obj)
Get the hash code for a Person object based on basic properties.
Vereinsmeisterschaften.Core.Models.Person
Class describing a person.
Definition
Person.cs:12
Vereinsmeisterschaften.Core.Models.Person.FirstName
string FirstName
First name of the person.
Definition
Person.cs:77
Vereinsmeisterschaften.Core.Models.Person.BirthYear
UInt16 BirthYear
Birth year of the person.
Definition
Person.cs:99
Vereinsmeisterschaften.Core.Models.Person.Name
string Name
Last name of the person.
Definition
Person.cs:66
Vereinsmeisterschaften.Core.Models.Person.Gender
Genders Gender
Gender of the person.
Definition
Person.cs:88
Vereinsmeisterschaften.Core.Models
Definition
Competition.cs:6
Vereinsmeisterschaften.Core
Models
PersonBasicEqualityComparer.cs
Generated on Sun Feb 22 2026 13:06:13 for Vereinsmeisterschaften by
1.13.2