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 { [DataContract(Name = "fruitdudemon")] public class FruitDuDemon : ObjetOhara { [DataMember (Name = "nomromanise")] public string NomRomanise { get; set; } [DataMember(Name = "type")] public string Type { 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 = "forces")] public string Forces { get; set; } [DataMember(Name = "faiblesses")] public string Faiblesses { get; set; } [DataMember(Name = "utilisateur",EmitDefaultValue = false)] public List Utilisateur { get; set; }= new List(); public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses, string image = "baseimage.png") : base(nom,image) { NomRomanise = nomRomanise; Type = type; if (premierEp < 0) { PremierEp = 0; } else { PremierEp = premierEp; } if (premierChap < 0) { premierChap = 0; } else { PremierChap = premierChap; } Description = description; Forces = forces; Faiblesses = faiblesses; } public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses,string image, List utilisateur) : this( nom, nomRomanise, type, premierChap, premierEp, description, forces, faiblesses, image) { Utilisateur = utilisateur; } } }