internal AttendeeWorkHours(TimeSpan startTime, TimeSpan endTime, DaysOfWeek daysOfWeek, ExTimeZone exTimeZone) { AttendeeWorkHours.Validate(startTime, endTime); this.startTime = startTime; this.endTime = endTime; this.daysOfWeek = daysOfWeek; this.timeZone = exTimeZone; this.CalculateWorkDayInconvenience(); }
public AttendeeWorkHours(WorkingHours workingHours) { if (workingHours != null) { WorkingPeriod workingPeriod = workingHours.WorkingPeriodArray[0]; TimeSpan timeSpan = TimeSpan.FromMinutes((double)workingPeriod.StartTimeInMinutes); TimeSpan timeSpan2 = TimeSpan.FromMinutes((double)workingPeriod.EndTimeInMinutes); AttendeeWorkHours.Validate(timeSpan, timeSpan2); this.startTime = timeSpan; this.endTime = timeSpan2; this.daysOfWeek = workingPeriod.DayOfWeek; this.timeZone = workingHours.ExTimeZone; } else { this.startTime = TimeSpan.Zero; this.endTime = TimeSpan.Zero; this.daysOfWeek = (DaysOfWeek.Sunday | DaysOfWeek.Monday | DaysOfWeek.Tuesday | DaysOfWeek.Wednesday | DaysOfWeek.Thursday | DaysOfWeek.Friday | DaysOfWeek.Saturday); this.timeZone = ExTimeZone.CurrentTimeZone; } this.CalculateWorkDayInconvenience(); }
public AttendeeData(MeetingAttendeeType attendeeType, string identity, bool excludeConflict, ExDateTime freeBusyStart, ExDateTime freeBusyEnd, string mergedFreeBusy, ExchangeVersionType requestSchemaVersion, AttendeeWorkHours workingHours) { if (identity == null) { throw new ArgumentNullException("identity"); } if (workingHours == null) { throw new ArgumentNullException("workingHours"); } if (freeBusyStart.TimeZone != freeBusyEnd.TimeZone) { throw new ArgumentException("freeBusyStart.TimeZone != freeBusyEnd.TimeZone"); } this.attendeeType = attendeeType; this.identity = identity; this.excludeConflict = excludeConflict; this.freeBusyStart = freeBusyStart; this.freeBusyEnd = freeBusyEnd; this.mergedFreeBusy = mergedFreeBusy; this.workingHours = workingHours; this.requestSchemaVersion = requestSchemaVersion; }