1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
[Serializable]
public class ItemConfig<T> : IItemConfig
{
public T Valeur{
get;
set;
}
[XmlAttribute]
public T Defaut{
get;
set;
}
public ItemConfig()
{ }
}
[Serializable]
public class CfgSection
{
private string _sectionName = "";
private IList<IItemConfig> _lst = new List<IItemConfig>();
[XmlAttribute]
public string Name{
get { return _sectionName; }
set { _sectionName = value; }
}
public IList<IItemConfig> Items{
get { return _lst; }
set {_lst = value; }
}
public CfgSection()
{}
}
[ Serializable ]
public class AppConfig
{
private string _file = "";
private List<CfgSection> _sections = new List<CfgSection>();
public string FichierConfig
{
get { return _file; }
}
public List<CfgSection> Sections
{
get { return _sections; }
set { _sections = value; }
}
public AppConfig()
{}
} |
Partager