コード例 #1
0
 public UserService(IUserRepository userRepository, PatientService patientService, SystemAdministratorService systemAdministratorService)
 {
     this.userRepository             = userRepository;
     this.patientService             = patientService;
     this.systemAdministratorService = systemAdministratorService;
 }
コード例 #2
0
        public AjaxController()
        {
            var messageRepository = new MessageRepository();
            var permissionRepository = new PermissionRepository();
            var churchRepository = new ChurchRepository();
            var personRepository = new PersonRepository(permissionRepository, churchRepository);
            var uploadPhotoRepository = new PhotoRepository();
            _familyRepository = new FamilyRepository(uploadPhotoRepository);
            _usernamePasswordRepository = new UsernamePasswordRepository(permissionRepository);
            var personGroupRepository = new PersonGroupRepository(personRepository);
            _personGroupRepository = personGroupRepository;
            var groupRepository = new GroupRepository();
            var emailSender = new EmailSender(messageRepository, new MessageRecepientRepository(), new MessageAttachmentRepository(), personRepository);
            var emailContentService = new EmailContentService(new EmailContentRepository());
            var churchEmailTemplateRepository = new ChurchEmailTemplatesRepository();
            _emailService = new EmailService(
                _usernamePasswordRepository,
                personRepository,
                groupRepository,
                emailSender,
                emailContentService,
                churchEmailTemplateRepository,
                permissionRepository
                );

            _passwordService = new PasswordService(personRepository, churchRepository, _usernamePasswordRepository, _emailService);

            _personService = new PersonService(
                personRepository,
                _personGroupRepository,
                permissionRepository,
                new PersonRoleRepository(),
                new PersonOptionalFieldRepository(),
                new RelationshipRepository(personRepository),
                new ChurchMatcherRepository(),
                groupRepository,
                _familyRepository,
                _emailService,
                new AddressRepository(),
                uploadPhotoRepository
                );

            _groupEventRepository = new GroupEventRepository(personRepository);
            _systemAdministratorService  = new SystemAdministratorService(churchRepository, permissionRepository);
            _personGroupService = new PersonGroupService(_personGroupRepository);
            _messageRecepientRepository = new MessageRecepientRepository();
            var httpPostService = new HttpPostService();
            _smsSender = new SmsSender(messageRepository, new MessageRecepientRepository(), personRepository, httpPostService);
            _churchEventsReporitory = new ChurchEventsRepository();
            _messageService = new MessageService(_messageRecepientRepository);
            var birthdayRepository = new BirthdayAndAniversaryRepository();
            var usernamePasswordRepository = new UsernamePasswordRepository(permissionRepository);
            var churchEmailTemplatesRepository = new ChurchEmailTemplatesRepository();
            var emailService = new EmailService(usernamePasswordRepository, personRepository, groupRepository, emailSender, emailContentService, churchEmailTemplatesRepository, permissionRepository);
            var eventRepository = new EventRepository(birthdayRepository);
            _eventService = new EventService(eventRepository, emailService, birthdayRepository);
            _childReportsService = new ChildReportsService(new ChildrenReportsRepository(), _emailService);
            _reminderService = new ReminderService(new ReminderRepository());
        }