public EventCollection(string str, EventCollectionType type) { Type = type; switch (type) { case EventCollectionType.JsonFeed: Url = str; break; case EventCollectionType.Function: Function = str; break; case EventCollectionType.GoogleCalendarFeed: GoogleCalendarId = str; break; } }
public EventCollection(IEnumerable <Event> events) { Events = events; Type = EventCollectionType.Array; }