| | 1 | | using System; |
| | 2 | |
|
| | 3 | | namespace DCL.UserProfiles |
| | 4 | | { |
| | 5 | | public record AdditionalInfo |
| | 6 | | { |
| 1595 | 7 | | public string Country { get; set; } |
| 1595 | 8 | | public string EmploymentStatus { get; set; } |
| 1595 | 9 | | public string Gender { get; set; } |
| 1595 | 10 | | public string Pronouns { get; set; } |
| 1595 | 11 | | public string RelationshipStatus { get; set; } |
| 1595 | 12 | | public string SexualOrientation { get; set; } |
| 1595 | 13 | | public string Language { get; set; } |
| 1595 | 14 | | public string Profession { get; set; } |
| 1597 | 15 | | public DateTime? BirthDate { get; set; } |
| 1595 | 16 | | public string RealName { get; set; } |
| 1595 | 17 | | public string Hobbies { get; set; } |
| | 18 | |
|
| 1514 | 19 | | public AdditionalInfo() |
| | 20 | | { |
| 1514 | 21 | | } |
| | 22 | |
|
| 22 | 23 | | public AdditionalInfo(AdditionalInfo other) |
| | 24 | | { |
| 22 | 25 | | CopyFrom(other); |
| 22 | 26 | | } |
| | 27 | |
|
| | 28 | | public void CopyFrom(AdditionalInfo additionalInfo) |
| | 29 | | { |
| 742 | 30 | | Country = additionalInfo.Country; |
| 742 | 31 | | EmploymentStatus = additionalInfo.EmploymentStatus; |
| 742 | 32 | | Gender = additionalInfo.Gender; |
| 742 | 33 | | Pronouns = additionalInfo.Pronouns; |
| 742 | 34 | | RelationshipStatus = additionalInfo.RelationshipStatus; |
| 742 | 35 | | SexualOrientation = additionalInfo.SexualOrientation; |
| 742 | 36 | | Language = additionalInfo.Language; |
| 742 | 37 | | Profession = additionalInfo.Profession; |
| 742 | 38 | | BirthDate = additionalInfo.BirthDate; |
| 742 | 39 | | RealName = additionalInfo.RealName; |
| 742 | 40 | | Hobbies = additionalInfo.Hobbies; |
| 742 | 41 | | } |
| | 42 | |
|
| | 43 | | public virtual bool Equals(AdditionalInfo other) |
| | 44 | | { |
| 21 | 45 | | if (ReferenceEquals(null, other)) return false; |
| 21 | 46 | | if (ReferenceEquals(this, other)) return true; |
| 21 | 47 | | return Country == other.Country && EmploymentStatus == other.EmploymentStatus |
| | 48 | | && Gender == other.Gender |
| | 49 | | && Pronouns == other.Pronouns |
| | 50 | | && RelationshipStatus == other.RelationshipStatus |
| | 51 | | && SexualOrientation == other.SexualOrientation |
| | 52 | | && Language == other.Language |
| | 53 | | && Profession == other.Profession |
| | 54 | | && Nullable.Equals(BirthDate, other.BirthDate) |
| | 55 | | && RealName == other.RealName |
| | 56 | | && Hobbies == other.Hobbies; |
| | 57 | | } |
| | 58 | |
|
| | 59 | | public override int GetHashCode() |
| | 60 | | { |
| 0 | 61 | | var hashCode = new HashCode(); |
| 0 | 62 | | hashCode.Add(Country); |
| 0 | 63 | | hashCode.Add(EmploymentStatus); |
| 0 | 64 | | hashCode.Add(Gender); |
| 0 | 65 | | hashCode.Add(Pronouns); |
| 0 | 66 | | hashCode.Add(RelationshipStatus); |
| 0 | 67 | | hashCode.Add(SexualOrientation); |
| 0 | 68 | | hashCode.Add(Language); |
| 0 | 69 | | hashCode.Add(Profession); |
| 0 | 70 | | hashCode.Add(BirthDate); |
| 0 | 71 | | hashCode.Add(RealName); |
| 0 | 72 | | hashCode.Add(Hobbies); |
| 0 | 73 | | return hashCode.ToHashCode(); |
| | 74 | | } |
| | 75 | | } |
| | 76 | | } |