1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-24 23:25:37 +01:00
GiantsTools/Giants.DataContract/Contracts/V1/PlayerInfo.cs

39 lines
909 B
C#
Raw Normal View History

using System;
2020-08-09 21:44:12 +02:00
using System.ComponentModel.DataAnnotations;
2020-08-16 11:03:10 +02:00
namespace Giants.DataContract.V1
{
public class PlayerInfo
{
2020-08-09 21:44:12 +02:00
[Required]
public int Index { get; set; }
2020-08-09 21:44:12 +02:00
[Required]
public string Name { get; set; }
2020-08-09 21:44:12 +02:00
[Required]
public int Frags { get; set; }
2020-08-09 21:44:12 +02:00
[Required]
public int Deaths { get; set; }
2020-08-09 21:44:12 +02:00
[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);
}
}
}