示例#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);
        }
示例#2
0
 public void Apply(AppointmentRescheduled @event)
 {
     TimeSlot = new TimeSlot(@event.From, @event.To);
 }