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

39 lines
906 B
C#
Raw Normal View History

using System;
2020-08-09 21:44:12 +02:00
using System.ComponentModel.DataAnnotations;
namespace Giants.DataContract
{
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);
}
}
}