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.
84 lines
2.4 KiB
84 lines
2.4 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.Serialization;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Linq;
|
|
|
|
namespace Model.Classes
|
|
{
|
|
[DataContract(Name = "ile")]
|
|
public class Ile : ObjetOhara
|
|
{
|
|
[DataMember(Name = "nomromanise")]
|
|
public string NomRomanise { get; set; }
|
|
[DataMember(Name = "region")]
|
|
public string Region { get; set; }
|
|
[DataMember(Name = "premierchap")]
|
|
public int PremierChap { get; set; }
|
|
[DataMember(Name = "premierep")]
|
|
public int PremierEp { get; set; }
|
|
[DataMember(Name = "description")]
|
|
public string Description { get; set; }
|
|
[DataMember(Name = "geographie")]
|
|
public string Geographie { get; set; }
|
|
|
|
|
|
|
|
public Ile(string nom, string nomRomanise, string region, int premierChap, int premierEp, string description, string geographie) : base(nom)
|
|
{
|
|
|
|
NomRomanise = nomRomanise;
|
|
Region = region;
|
|
if (premierEp < 0)
|
|
{
|
|
PremierEp = 0;
|
|
}
|
|
else
|
|
{
|
|
PremierEp = premierEp;
|
|
}
|
|
if (premierChap < 0)
|
|
{
|
|
premierChap = 0;
|
|
}
|
|
else
|
|
{
|
|
PremierChap = premierChap;
|
|
}
|
|
Description = description;
|
|
Geographie = geographie;
|
|
|
|
}
|
|
|
|
public Ile(string nom, string nomRomanise, string region, int premierChap, int premierEp, string description, string geographie, string image) : this(nom, nomRomanise, region, premierChap, premierEp, description, geographie)
|
|
{
|
|
|
|
Image = image;
|
|
}
|
|
|
|
public override bool Equals(object? obj)
|
|
{
|
|
if (obj == null) return false;
|
|
else
|
|
{
|
|
Ile o = (Ile)obj;
|
|
return o.Nom == Nom;
|
|
}
|
|
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
|
|
return HashCode.Combine(NomRomanise, Region, PremierChap, PremierEp, Description, Geographie);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "Ile :"+ Nom +" "+NomRomanise+" "+Region+" "+PremierChap+" "+PremierEp+" "+Description+" "+Geographie+" "+Image;
|
|
}
|
|
}
|
|
}
|