Archétype.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System.Xml.Serialization;
  2. namespace Domain.XML_Model
  3. {
  4. [Serializable]
  5. [XmlRoot(ElementName = "archétypes")]
  6. public class Archétype : BaseEntity
  7. {
  8. [XmlAttribute(AttributeName = "id")]
  9. public string Id { get; set; }
  10. [XmlAttribute(AttributeName = "nom")]
  11. public string? Nom { get; set; }
  12. [XmlAttribute(AttributeName = "caractéristiques")]
  13. public string? Caractéristiques { get; set; }
  14. [XmlAttribute(AttributeName = "mouvement")]
  15. public string? Mouvement { get; set; }
  16. [XmlAttribute(AttributeName = "blessures")]
  17. public int Blessures { get; set; }
  18. [XmlAttribute(AttributeName = "traits")]
  19. public string? Traits { get; set; }
  20. //[XmlAttribute(AttributeName = "traits")]
  21. //public string? TraitsAsText {
  22. // get { return (Traits.HasValue) ? Traits.ToString() : null; }
  23. // set { Traits = !string?.IsNullOrEmpty(value) ? int.Parse(value) : default(int?); }
  24. //}
  25. [XmlAttribute(AttributeName = "competences")]
  26. public string? Competences { get; set; }
  27. [XmlAttribute(AttributeName = "talents")]
  28. public string? Talents { get; set; }
  29. [XmlAttribute(AttributeName = "pouvoirs")]
  30. public string? Pouvoirs { get; set; }
  31. //[XmlAttribute(AttributeName = "pouvoirs")]
  32. //public string? PouvoirsAsText
  33. //{
  34. // get { return (Pouvoirs.HasValue) ? Pouvoirs.ToString() : null; }
  35. // set { Pouvoirs = !string?.IsNullOrEmpty(value) ? int.Parse(value) : default(int?); }
  36. //}
  37. [XmlAttribute(AttributeName = "armures")]
  38. public string? Armures { get; set; }
  39. [XmlAttribute(AttributeName = "armes")]
  40. public string? Armes { get; set; }
  41. [XmlAttribute(AttributeName = "equipement")]
  42. public string? Equipement { get; set; }
  43. [XmlAttribute(AttributeName = "menace")]
  44. public string? Menace { get; set; }
  45. [XmlAttribute(AttributeName = "description")]
  46. public string? Description { get; set; }
  47. [XmlIgnore] public int ArchétypeId { get; set; }
  48. }
  49. }