Ejemplo n.º 1
0
        private MessageGroup ParseGroupNode(XmlElement groupNode)
        {
            var group = new MessageGroup {
                Name = groupNode.GetAttribute("name")
            };

            foreach (var msgNode in groupNode.ChildNodes.OfType <XmlElement>().Where(e => e.Name.Equals("msg")))
            {
                group.Messages.Add(ParseMessageNode(msgNode));
            }
            group.Messages.ForEach(e => e.Group = group);
            return(group);
        }
Ejemplo n.º 2
0
 private MessageGroup ParseGroupNode(XmlElement groupNode)
 {
     var group = new MessageGroup {Name = groupNode.GetAttribute("name")};
     foreach (var msgNode in groupNode.ChildNodes.OfType<XmlElement>().Where(e => e.Name.Equals("msg")))
     {
         group.Messages.Add(ParseMessageNode(msgNode));
     }
     group.Messages.ForEach(e => e.Group = group);
     return group;
 }