You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.7 KiB
60 lines
1.7 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Numerics;
|
|
using System.Runtime.Serialization;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Linq;
|
|
|
|
namespace Model.Classes
|
|
{
|
|
[DataContract(Name = "bestiaire")]
|
|
public class Bestiaire : ObjetOhara
|
|
{
|
|
[DataMember(Name = "origine")]
|
|
public string Origine { get; set; }
|
|
[DataMember(Name = "description")]
|
|
public string Description { get; set; }
|
|
[DataMember(Name = "caracteristique")]
|
|
public string Caracteristique { get; set; }
|
|
|
|
public Bestiaire(string nom, string origine, string description, string caracteristique) : base(nom)
|
|
{
|
|
Origine = origine;
|
|
Description = description;
|
|
Caracteristique = caracteristique;
|
|
}
|
|
|
|
public Bestiaire(string nom, string origine, string description, string caracteristique, string image) : this(nom, origine, description, caracteristique)
|
|
{
|
|
Image = image;
|
|
}
|
|
public override bool Equals(object? obj)
|
|
{
|
|
if (obj == null) return false;
|
|
if (this.GetType() != obj.GetType())
|
|
{
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
Bestiaire o = (Bestiaire)obj;
|
|
return o.Nom == Nom;
|
|
}
|
|
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
|
|
return HashCode.Combine(Origine, Description, Caracteristique);
|
|
}
|
|
public override string ToString()
|
|
{
|
|
return "Bestiaire :" + Nom +" "+EstFavori+ " " + Origine + " " + Description + " " + Caracteristique +" " + Image;
|
|
}
|
|
|
|
}
|
|
}
|