Beispiel #1
0
        public Board(XElement data)
        {
            Name = data.GetCleanName();

            widgets = data.Elements().SelectMany(group => group.Elements().Select(x =>
                                                                                  new Widget
            {
                Board    = this,
                Group    = group.Name.LocalName,
                Title    = x.GetCleanName(),
                Colour   = x.GetValue <string>("@colour"),
                Feature  = Feature.FindByRef(x.GetValue <string>("@feature")) ?? throw new Exception("Feature not specified!"),
                Settings = Feature.FindByRef(x.GetValue <string>("@settings"))
            })).ToList();