Beispiel #1
0
        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;
                }
            }
        }
Beispiel #2
0
 public Group(Package package, Group parent) : base(package, parent)
 {
     Children   = new GroupCollection(this);
     Operations = new OperationCollection(this);
 }