using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace ModernLangToolsApp
{
    [XmlRoot("Jedi")]
    public class Jedi
    {
        [XmlAttribute("Név")]
        public string Name { get; set; }

        private int midiChlorianCount;

        [XmlAttribute("MidiChlorianSzám")]
        public int MidiChlorianCount
        {
            get { return midiChlorianCount; }
            set
            {
                if (value <= 35)
                {
                    throw new ArgumentException("You are not a true jedi!");
                }
                midiChlorianCount = value;
            }
        }

        public Jedi() { }
    }
}
