public PackageItemContainer(XmlElement element) : base(element) { Children = new SetCollection(); Operations = new OperationCollection(); foreach (XmlElement e in element.ChildNodes) { switch (e.Name) { case "set": Set set = new Set(e); Children.Add(set); break; case "patch": PatchOperation patch = new PatchOperation(e); Operations.Add(patch); break; case "file": case "filetype": break; } } }
public Group(Package package, Group parent, XmlElement element) : base(package, parent, element) { ///////////////////////////////////////////////////// Children = new GroupCollection(this); Operations = new OperationCollection(this); IsResGroup = element.GetAttribute("isResGroup") == "true" || element.GetAttribute("isResGroup") == "1"; foreach (XmlNode node in element.ChildNodes) { if (node.NodeType != XmlNodeType.Element) { continue; } XmlElement e = node as XmlElement; switch (e.Name) { case "group": Group group = new Group(package, this, e); Children.Add(group); break; default: Operation op = Operation.FromElement(this, e); if (op != null) { Operations.Add(op); } break; } } }