Пример #1
0
        /// <summary>
        /// Constructs the report categorizer with required dependencies
        /// </summary>
        /// <param name="categoryRepository">The category repository</param>
        /// <param name="translatorFactory">The translator factory</param>
        /// <param name="unitOfWork">The unit of work</param>
        public ReportCategorizer
        (
            IReportCategoryRepository categoryRepository,
            IPhraseTranslatorFactory translatorFactory,
            IUnitOfWork unitOfWork
        )
        {
            Validate.IsNotNull(categoryRepository);
            Validate.IsNotNull(translatorFactory);
            Validate.IsNotNull(unitOfWork);

            _categoryRepository = categoryRepository;
            _translator         = translatorFactory.GetDictionary();
            _unitOfWork         = unitOfWork;
        }
Пример #2
0
        /// <summary>
        /// Constructs the report categorizer with required dependencies
        /// </summary>
        /// <param name="reportRepository">The report repository</param>
        /// <param name="categoryRepository">The category repository</param>
        /// <param name="roleAssignmentRepository">The role assignment repository</param>
        /// <param name="translatorFactory">The translator factory</param>
        /// <param name="unitOfWork">The unit of work</param>
        public ReportRegistrar
        (
            IRegisteredReportRepository reportRepository,
            IReportCategoryRepository categoryRepository,
            IReportRoleAssignmentRepository roleAssignmentRepository,
            IPhraseTranslatorFactory translatorFactory,
            IUnitOfWork unitOfWork
        )
        {
            Validate.IsNotNull(reportRepository);
            Validate.IsNotNull(categoryRepository);
            Validate.IsNotNull(roleAssignmentRepository);
            Validate.IsNotNull(translatorFactory);
            Validate.IsNotNull(unitOfWork);

            _reportRepository         = reportRepository;
            _categoryRepository       = categoryRepository;
            _roleAssignmentRepository = roleAssignmentRepository;
            _translator = translatorFactory.GetDictionary();
            _unitOfWork = unitOfWork;
        }