Skip to content
Browse files

Changed ticket price to decimal. Cleaned up unused files.

  • Loading branch information...
1 parent a7e9c8f commit c7be98a1cd02a858d0ce76d693bacb10964de87d @penguinboy committed Feb 11, 2011
View
0 .gitignore 100644 → 100755
File mode changed.
View
0 Entities/Attendee.cs 100644 → 100755
File mode changed.
View
0 Entities/EntityBase.cs 100644 → 100755
File mode changed.
View
0 Entities/Event.cs 100644 → 100755
File mode changed.
View
11 Entities/IEntity.cs
@@ -1,11 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace EventbriteNET.Entities
-{
- interface IEntity
- {
- }
-}
View
37 Entities/Organiser.cs
@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using EventbriteNET.HttpApi;
-
-namespace EventbriteNET.Entities
-{
- public class Organiser
- {
- public int Id;
-
- private Dictionary<int, Event> events;
- public Dictionary<int, Event> Events
- {
- get
- {
- if (events == null)
- {
- events = new Dictionary<int, Event>();
- var eventArray = new OrganiserEventsRequest(this.Id).GetResponse();
- foreach (var eventEntity in eventArray)
- {
- events.Add(eventEntity.Id, eventEntity);
- }
- }
- return events;
- }
- }
-
- public Organiser(int id)
- {
- this.Id = id;
- }
-
- }
-}
View
0 Entities/Organizer.cs 100644 → 100755
File mode changed.
View
2 Entities/Ticket.cs 100644 → 100755
@@ -17,7 +17,7 @@ public class Ticket : EntityBase
public string Description;
public TicketType Type;
public string Currency;
- public float Price;
+ public decimal Price;
public DateTime? StartDateTime;
public DateTime EndDateTime;
public int? QuantityAvailable;
View
0 EventbriteContext.cs 100644 → 100755
File mode changed.
View
0 EventbriteNET.csproj 100644 → 100755
File mode changed.
View
0 HttpApi/EventAttendeesRequest.cs 100644 → 100755
File mode changed.
View
0 HttpApi/EventRequest.cs 100644 → 100755
File mode changed.
View
25 HttpApi/OrganiserEventsRequest.cs
@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using EventbriteNET.Entities;
-using EventbriteNET.Xml;
-
-namespace EventbriteNET.HttpApi
-{
- public class OrganiserEventsRequest : RequestBase
- {
- const string PATH = "organizer_list_events";
-
- public OrganiserEventsRequest(int organiserId)
- : base(PATH)
- {
- this.AddGet("id", organiserId.ToString());
- }
-
- public Event[] GetResponse()
- {
- return new OrganisationEventsBuilder().Build(base.GetResponse());
- }
- }
-}
View
0 HttpApi/OrganizerEventsRequest.cs 100644 → 100755
File mode changed.
View
0 HttpApi/RequestBase.cs 100644 → 100755
File mode changed.
View
0 Properties/AssemblyInfo.cs 100644 → 100755
File mode changed.
View
0 README.md 100644 → 100755
File mode changed.
View
0 Xml/AttendeeBuilder.cs 100644 → 100755
File mode changed.
View
0 Xml/BuilderBase.cs 100644 → 100755
File mode changed.
View
0 Xml/EventAttendeesBuilder.cs 100644 → 100755
File mode changed.
View
0 Xml/EventBuilder.cs 100644 → 100755
File mode changed.
View
13 Xml/IBuilder.cs
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using EventbriteNET.Entities;
-
-namespace EventbriteNET.Xml
-{
- interface IBuilder
- {
- IEntity Build();
- }
-}
View
33 Xml/OrganisationEventsBuilder.cs
@@ -1,33 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using EventbriteNET.Entities;
-using System.IO;
-using System.Xml;
-
-namespace EventbriteNET.Xml
-{
- class OrganisationEventsBuilder
- {
- public Event[] Build(string 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();
- foreach (XmlNode eventNode in events)
- {
- var eventEntity = builder.Build(eventNode.OuterXml);
- toReturn.Add(eventEntity);
- }
-
- return toReturn.ToArray();
- }
- }
-}
View
0 Xml/OrganizerEventsBuilder.cs 100644 → 100755
File mode changed.
View
2 Xml/TicketBuilder.cs 100644 → 100755
@@ -47,7 +47,7 @@ public Ticket Build(string xmlString)
}
if (toReturn.Type == TicketType.FixedPrice)
{
- toReturn.Price = float.Parse(doc.GetElementsByTagName("price")[0].InnerText);
+ toReturn.Price = Decimal.Parse(doc.GetElementsByTagName("price")[0].InnerText);
}

0 comments on commit c7be98a

Please sign in to comment.
Something went wrong with that request. Please try again.