예제 #1
0
        public void Execute(AppointmentStarted @event)
        {
            Printer.Print(ConsoleColor.Magenta);

            var appointmentRepository = new MyRepository <Appointment>();
            var appointment           = appointmentRepository.Fetch(@event.AppointmentId);
            var jobRepository         = new MyRepository <Job>();
            var job = jobRepository.Fetch(appointment.JobId);

            job.Start();

            //Printer.Print("Job marked as in progress", ConsoleColor.Magenta);
        }
예제 #2
0
 public void Handle(AppointmentStarted @event)
 {
     Status = Status.InProgress;
 }