From f1a22701c29323342f1226772999c3eb1aed9d10 Mon Sep 17 00:00:00 2001 From: Sebastien Aube Date: Fri, 30 Aug 2013 10:02:46 -0300 Subject: [PATCH 1/2] Adding support for event url --- Entities/Event.cs | 2 ++ Xml/EventBuilder.cs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Entities/Event.cs b/Entities/Event.cs index d873a3b..eb57dbf 100755 --- a/Entities/Event.cs +++ b/Entities/Event.cs @@ -9,11 +9,13 @@ public class Event : EntityBase public long Id; public string Title; public string Description; + public string Url; public DateTime StartDateTime; public DateTime EndDateTime; public DateTime Created; public DateTime Modified; + public Dictionary Tickets = new Dictionary(); private List attendees; diff --git a/Xml/EventBuilder.cs b/Xml/EventBuilder.cs index d78c659..bf43418 100755 --- a/Xml/EventBuilder.cs +++ b/Xml/EventBuilder.cs @@ -17,9 +17,12 @@ public Event Build(string xmlString) var doc = new XmlDocument(); doc.LoadXml(xmlString); + System.IO.File.WriteAllText("C:\\temp\\log.xml", xmlString); + toReturn.Id = long.Parse(doc.GetElementsByTagName("id")[0].InnerText); toReturn.Title = doc.GetElementsByTagName("title")[0].InnerText; - toReturn.Description = doc.GetElementsByTagName("description")[0].InnerText; ; + toReturn.Description = doc.GetElementsByTagName("description")[0].InnerText; + toReturn.Url = doc.SelectSingleNode("/event/url").InnerText; toReturn.StartDateTime = DateTime.Parse(doc.GetElementsByTagName("start_date")[0].InnerText); toReturn.EndDateTime = DateTime.Parse(doc.GetElementsByTagName("end_date")[0].InnerText); toReturn.Created = DateTime.Parse(doc.GetElementsByTagName("created")[0].InnerText); From eb00765e775cdae51ea2deed357a550e778ca783 Mon Sep 17 00:00:00 2001 From: Sebastien Aube Date: Fri, 30 Aug 2013 10:05:54 -0300 Subject: [PATCH 2/2] Removing remnants of my testing --- Xml/EventBuilder.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Xml/EventBuilder.cs b/Xml/EventBuilder.cs index bf43418..057e1ea 100755 --- a/Xml/EventBuilder.cs +++ b/Xml/EventBuilder.cs @@ -17,8 +17,6 @@ public Event Build(string xmlString) var doc = new XmlDocument(); doc.LoadXml(xmlString); - System.IO.File.WriteAllText("C:\\temp\\log.xml", xmlString); - toReturn.Id = long.Parse(doc.GetElementsByTagName("id")[0].InnerText); toReturn.Title = doc.GetElementsByTagName("title")[0].InnerText; toReturn.Description = doc.GetElementsByTagName("description")[0].InnerText;