Ejemplo n.º 1
0
        public Event[] Build(string xmlString)
        {
            this.Validate(xmlString);

            var stringReader = new StringReader(xmlString);

            var toReturn = new List<Event>();

            var doc = new XmlDocument();
            doc.LoadXml(xmlString);

            var events = doc.GetElementsByTagName("event");
            var builder = new EventBuilder(this.Context);
            foreach (XmlNode eventNode in events)
            {
                var eventEntity = builder.Build(eventNode.OuterXml);
                toReturn.Add(eventEntity);
            }

            return toReturn.ToArray();
        }
Ejemplo n.º 2
0
        public Event[] Build(string xmlString)
        {
            this.Validate(xmlString);

            var stringReader = new StringReader(xmlString);

            var toReturn = new List <Event>();

            var doc = new XmlDocument();

            doc.LoadXml(xmlString);

            var events  = doc.GetElementsByTagName("event");
            var builder = new EventBuilder(this.Context);

            foreach (XmlNode eventNode in events)
            {
                var eventEntity = builder.Build(eventNode.OuterXml);
                toReturn.Add(eventEntity);
            }

            return(toReturn.ToArray());
        }