예제 #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);
        }
예제 #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;
 }