Exemple #1
0
        public AppointmentsOfAPatientReadModel(Guid patientId,
                                               IClientEventBus eventBus,
                                               IEnumerable <AppointmentTransferData> initialAppointmentData)
            : base(eventBus)
        {
            this.patientId = patientId;


            appointmentSet = new RawAppointmentSet(initialAppointmentData);
        }
        public ClientReadModelRepository(IClientEventBus eventBus,
                                         IClientPatientRepository patientsRepository,
                                         IClientMedicalPracticeRepository medicalPracticeRepository,
                                         IClientLabelRepository labelRepository,
                                         IConnectionService connectionService)
        {
            this.eventBus                  = eventBus;
            this.patientsRepository        = patientsRepository;
            this.medicalPracticeRepository = medicalPracticeRepository;
            this.labelRepository           = labelRepository;
            this.connectionService         = connectionService;

            cachedDayReadmodels    = new ConcurrentDictionary <AggregateIdentifier, AppointmentsOfADayReadModel>();
            cachedPatientReadmodel = new ConcurrentDictionary <Guid, AppointmentsOfAPatientReadModel>();
        }
        public AppointmentsOfADayReadModel(IClientEventBus eventBus,
                                           IClientPatientRepository patientsRepository,
                                           IClientLabelRepository labelRepository,
                                           ClientMedicalPracticeData medicalPractice,
                                           IEnumerable <AppointmentTransferData> initialAppointmentData,
                                           AggregateIdentifier identifier,
                                           uint initialAggregateVersion,
                                           Action <string> errorCallback)
            : base(eventBus)
        {
            this.errorCallback = errorCallback;

            AggregateVersion = initialAggregateVersion;
            Identifier       = identifier;

            var initialAppointmentList = initialAppointmentData.ToList();

            appointmentSet = new AppointmentSet(patientsRepository, labelRepository,
                                                initialAppointmentList, medicalPractice,
                                                errorCallback);
        }
Exemple #4
0
        protected ReadModelBase(IClientEventBus eventBus)
        {
            this.eventBus = eventBus;

            RegisterAtEventBus();
        }
Exemple #5
0
 protected DayReadModelBase(IClientEventBus eventBus)
     : base(eventBus)
 {
 }
 protected PatientReadModelBase(IClientEventBus eventBus)
     : base(eventBus)
 {
 }