protected CalendarEntry(int id, CalendarEntryType entryType, string description, bool isPublic, bool isAuthorised)
 {
     this.id = id;
     this.entryType = entryType;
     this.description = description;
     this.isPublic = isPublic;
     this.isAuthorised = isAuthorised;
 }
 private static TimeRangeEntry GetTimeRangeEntry(CalendarEntryType calendarEntryType, DateTimeOffset startDate, DateTimeOffset endDate)
 {
     return new TimeRangeEntry(0,
                               calendarEntryType,
                               "",
                               true,
                               true,
                               startDate,
                               endDate);
 }
 public SingleTimeEntry(int calendarItemId, CalendarEntryType entryType, string description, bool isPublic, bool isAuthorised, DateTimeOffset startDate)
     : base(calendarItemId, entryType, description, isPublic, isAuthorised)
 {
     this.startDate = startDate;
 }
 private CalendarEntry GetCalendarEntry(CalendarEntryType calendarEntryType)
 {
     CalendarEntry calendarEntry;
     return calendarEntries.TryGetValue(calendarEntryType, out calendarEntry)
         ? calendarEntry
         : new NullCalendarEntry();
 }
 public CalendarItem GetFromType(CalendarEntryType voting)
 {
     return db.CalendarItems.FindByEntryTypeString(voting.ToString());
 }
 private static SingleTimeEntry GetSingleTimeEntry(CalendarEntryType calendarEntryType, DateTimeOffset startTime)
 {
     return new SingleTimeEntry(1, calendarEntryType, "", true, true, startTime);
 }
 public TimeRangeEntry(int id, CalendarEntryType entryType, string description, bool isPublic, bool isAuthorised, DateTimeOffset startDate, DateTimeOffset endDate)
     : base(id, entryType, description, isPublic, isAuthorised)
 {
     this.startDate = startDate;
     this.endDate = endDate;
 }