2020-08-09 11:10:33 +02:00
|
|
|
|
using System;
|
2020-08-09 21:44:12 +02:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2020-08-09 11:10:33 +02:00
|
|
|
|
|
2020-08-16 11:03:10 +02:00
|
|
|
|
namespace Giants.DataContract.V1
|
2020-08-08 08:53:35 +02:00
|
|
|
|
{
|
|
|
|
|
public class PlayerInfo
|
|
|
|
|
{
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public int Index { get; set; }
|
|
|
|
|
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public int Frags { get; set; }
|
|
|
|
|
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public int Deaths { get; set; }
|
|
|
|
|
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public string TeamName { get; set; }
|
2020-08-09 11:10:33 +02:00
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
{
|
|
|
|
|
return obj is PlayerInfo info &&
|
2020-09-06 01:47:00 +02:00
|
|
|
|
this.Index == info.Index &&
|
|
|
|
|
this.Name == info.Name &&
|
|
|
|
|
this.Frags == info.Frags &&
|
|
|
|
|
this.Deaths == info.Deaths &&
|
|
|
|
|
this.TeamName == info.TeamName;
|
2020-08-09 11:10:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
2020-09-06 01:47:00 +02:00
|
|
|
|
return HashCode.Combine(this.Index, this.Name, this.Frags, this.Deaths, this.TeamName);
|
2020-08-09 11:10:33 +02:00
|
|
|
|
}
|
2020-08-08 08:53:35 +02:00
|
|
|
|
}
|
|
|
|
|
}
|