示例#1
0
        /// <summary>
        /// UserAgreementController constructor
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="userManager"></param>
        /// <param name="httpContextAccessor"></param>
        /// <param name="configuration"></param>
        /// <param name="logger"></param>
        /// <param name="membershipManager"></param>
        /// <param name="personRepository"></param>
        /// <param name="personEmailRepository"></param>
        /// <param name="emailVerificationRepository"></param>
        /// <param name="termsConditionsManager"></param>
        /// <param name="emailSender"></param>
        public UserAgreementController(
            IUserAgreementRepository repository,
            ApplicationIdentityUserManager userManager,
            IHttpContextAccessor httpContextAccessor,
            IMembershipManager membershipManager,
            IPersonRepository personRepository,
            IPersonEmailRepository personEmailRepository,
            IEmailVerificationRepository emailVerificationRepository,
            ITermsConditionsManager termsConditionsManager,
            IConfiguration configuration) : base(repository, userManager, httpContextAccessor, membershipManager, configuration)
        {
            this.repository                  = repository;
            this.membershipManager           = membershipManager;
            this.personRepository            = personRepository;
            this.personEmailRepository       = personEmailRepository;
            this.emailVerificationRepository = emailVerificationRepository;
            this.termsConditionsManager      = termsConditionsManager;

            this.repository.SetContext(SecurityContext);
            this.membershipManager.SetContext(SecurityContext);
            this.personRepository.SetContext(SecurityContext);
            this.personEmailRepository.SetContext(SecurityContext);
            this.emailVerificationRepository.SetContext(SecurityContext);
            this.termsConditionsManager.SetContext(SecurityContext);
        }
示例#2
0
        public TermsConditionsManager(IUserAgreementRepository userAgreementRepository, IUserConsentRepository userConsentRepository)
        {
            _userAgreementRepository = userAgreementRepository;
            _userConsentRepository   = userConsentRepository;

            _userAgreementRepository.SetContext(base.SecurityContext);
            _userConsentRepository.SetContext(base.SecurityContext);
        }