1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-06-26 00:01:44 +02:00
GiantsTools/Giants.DataContract/Contracts/V1/PlayerInfo.cs
2020-08-10 00:29:28 -07:00

39 lines
906 B
C#

using System;
using System.ComponentModel.DataAnnotations;
namespace Giants.DataContract
{
public class PlayerInfo
{
[Required]
public int Index { get; set; }
[Required]
public string Name { get; set; }
[Required]
public int Frags { get; set; }
[Required]
public int Deaths { get; set; }
[Required]
public string TeamName { get; set; }
public override bool Equals(object obj)
{
return obj is PlayerInfo info &&
Index == info.Index &&
Name == info.Name &&
Frags == info.Frags &&
Deaths == info.Deaths &&
TeamName == info.TeamName;
}
public override int GetHashCode()
{
return HashCode.Combine(Index, Name, Frags, Deaths, TeamName);
}
}
}