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

39 lines
959 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 &&
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);
}
}
}