Esempio n. 1
0
        public void SaveChanges()
        {
            // Alle Jobs, die Termine erstellen, realisieren
            while (CreateJobQueue.Count > 0)
            {
                var job = CreateJobQueue.Dequeue();

                mko.TraceHlp.ThrowArgExIfNot(job.IsValid, "ungültige Termine");

                var appointment = job.Create();
                _timelineDict[GetKey(appointment.Owner,
                                     ToDateTime(appointment.BeginDate, appointment.BeginTime),
                                     ToDateTime(appointment.EndDate, appointment.EndTime))] = appointment;
            }

            // Alle Jobs, die Termine löschen, realisieren
            while (DeleteJobQueue.Count > 0)
            {
                var key = DeleteJobQueue.Dequeue();

                mko.TraceHlp.ThrowArgExIfNot(_timelineDict.ContainsKey(key), "Nicht existierender Termin " + key + " sollte gelöscht werden");

                _timelineDict.Remove(key);
            }
        }
Esempio n. 2
0
        public IAppointmentBuilder Create()
        {
            var bld = new AppointmentBuilder();

            CreateJobQueue.Enqueue(bld);
            return(bld);
        }
Esempio n. 3
0
 public void Rollback()
 {
     CreateJobQueue.Clear();
     DeleteJobQueue.Clear();
 }