private void LoadAppointments(ScheduleView.DateSpan dateSpan)
        {
            this.shouldProcessCollectionChanged = false;

            this.Appointments.Clear();
            CalendarRepository.GetAppointmentsByRange(dateSpan.Start, dateSpan.End, items =>
                {
                    this.Appointments.AddRange(items);
                });
            this.shouldProcessCollectionChanged = true;
        }
        private void SetTimeMarkerToOccurrence(ref Service.Appointment appointment, Service.TimeMarker newTimeMarker, ref ScheduleView.IExceptionOccurrence exceptionToEdit)
        {
            appointment = (this.SelectedAppointment as ScheduleView.Occurrence).Master as Service.Appointment;
            if (appointment != null && appointment.RecurrenceRule != null)
            {
                exceptionToEdit = appointment.RecurrenceRule.Exceptions.SingleOrDefault(e => (e.Appointment as ScheduleView.IOccurrence) == ((ScheduleView.Occurrence)(this.SelectedAppointment)).Appointment);
                if (exceptionToEdit != null)
                {
                    appointment.RecurrenceRule.Exceptions.Remove(exceptionToEdit);
                    SetTimeMarker(exceptionToEdit.Appointment as Service.Appointment, newTimeMarker);

                    appointment.RecurrenceRule.Exceptions.Add(exceptionToEdit);
                }

                SetTimeMarker(appointment, newTimeMarker);

                this.ReplaceItem(appointment);
            }
        }