Exemplo n.º 1
0
        public void Reschedule(DateTime from, DateTime to)
        {
            Printer.Print(ConsoleColor.Cyan);

            var @event = new AppointmentRescheduled(Id, from, to);

            Apply(@event);
            DomainEvents.Publish(@event);
        }
Exemplo n.º 2
0
 public void Apply(AppointmentRescheduled @event)
 {
     TimeSlot = new TimeSlot(@event.From, @event.To);
 }