public Event(TeacherPreference preferences, DateTime availabilityStart, DateTime availabilityEnd, int travelDuration = 0)
 {
     this.sortId          = Guid.NewGuid();
     this.preferences     = preferences;
     this.backgroundColor = "#dbd4d3";
     this.textColor       = "#000000";
     this.title           = "Available";
     this.groupId         = "Availability";
     this.start           = availabilityStart;
     this.end             = availabilityEnd;
     this.officialStart   = availabilityStart + SchedService.ConvertIntToTimeSpan(travelDuration);
     this.officialEnd     = availabilityEnd - SchedService.ConvertIntToTimeSpan(travelDuration);
     this.price           = SchedService.CreatePrice(preferences.PerHourRate, this.start, this.end);
 }
 public static Event CreateAvailableTimeSlot(TeacherPreference preferences, DateTime start, DateTime end, int travelDuration = 0)
 {
     return(new Event(preferences, start, end, travelDuration));
 }
 public Event(TeacherPreference preferences, Lesson lesson)
 {
     // todo: build lesson event creation here
     this.preferences = preferences;
 }