1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-05 06:45:37 +01:00
GiantsTools/Giants.DataContract/Contracts/V1/PlayerInfo.cs
2020-09-05 22:22:23 -07:00

39 lines
959 B
C#

using System;
using System.ComponentModel.DataAnnotations;
namespace Giants.DataContract.V1
{
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 &&
this.Index == info.Index &&
this.Name == info.Name &&
this.Frags == info.Frags &&
this.Deaths == info.Deaths &&
this.TeamName == info.TeamName;
}
public override int GetHashCode()
{
return HashCode.Combine(this.Index, this.Name, this.Frags, this.Deaths, this.TeamName);
}
}
}