public AppointmentActorSystem(ActorSystem actorSystem, IAppointmentEventPusher appointmentEventsPusher) { _appointmentEventsPusher = appointmentEventsPusher; _actorSystem = actorSystem; Init("akka.tcp://[email protected]:8091/user/AppointmentController"); }
public SignalRBridgeActor(IAppointmentEventPusher appointmentEventPusher, IActorRef appointmentController) { _appointmentEventPusher = appointmentEventPusher; _appointmentController = appointmentController; //This wires up our event handlers #region Commands Receive <AppointmentRequestedCommand>( message => _appointmentController.Tell(message)); Receive <AppointmentConfirmedCommand>( message => _appointmentController.Tell(message)); Receive <AppointmentRescheduledCommand>( message => _appointmentController.Tell(message)); Receive <LoadAppointmentsCommand>( message => _appointmentController.Tell(message)); #endregion #region Events Receive <AppointmentRequestedEvent>( message => { _appointmentEventPusher.AppointmentRequestedEvent(message.Appointment); }); Receive <AppointmentConfirmedEvent>( message => { _appointmentEventPusher.AppointmentConfirmedEvent(message.Appointment); }); Receive <AppointmentRescheduledEvent>( message => { _appointmentEventPusher.AppointmentRescheduledEvent(message.Appointment); }); Receive <LoadRequestedAppointmentsEvent>( message => { _appointmentEventPusher.LoadRequestedAppointmentsEvent(message.Appointments); }); Receive <LoadConfirmedAppointmentsEvent>( message => { _appointmentEventPusher.LoadConfirmedAppointmentsEvent(message.Appointments); }); Receive <LoadRescheduledAppointmentsEvent>( message => { _appointmentEventPusher.LoadRescheduledAppointmentsEvent(message.Appointments); }); #endregion }