private List<Property> LoadProperties(XDocument doc) { var items = doc.GetNodes("project/props/prop") .Select(p => new Property(p.GetAttribute("name"), p.GetAttribute("value"))) .ToList(); return items; }
private List<Scope> LoadScopes(XDocument doc) { var scopes = doc.GetNodes("project/scope") .Select(p => new Scope(p.GetSafeAttribute("version"), LoadBlocks(p))) .ToList(); return scopes; }
private List<Input> LoadInputs(XDocument doc) { var items = doc.GetNodes("project/input/field") .Select(p => new Input(p.GetAttribute("name"), p.GetAttribute("title"), ParseInputType(p.GetSafeAttribute("type")), p.GetSafeAttribute("default", ""), bool.Parse(p.GetSafeAttribute("allowBlank", "false")), bool.Parse(p.GetSafeAttribute("enabled", "true")))) .ToList(); return items; }