using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; namespace DrumKit { [XmlType("drumkitConfig")] public class DrumkitConfig { [XmlIgnore()] public Dictionary Drums { get; private set; } [XmlArray("drums")] public DrumConfig[] DrumsList { get { List configs = new List(); foreach (var i in Drums) configs.Add(i.Value); return configs.ToArray(); } set { foreach (var i in value) Drums.Add(i.TargetId, i); } } /// /// Constructor /// public DrumkitConfig() { this.Drums = new Dictionary(); } } }