public ResultSubjectMetaService(
     ContentDbContext contentDbContext,
     IFilterItemRepository filterItemRepository,
     IBoundaryLevelRepository boundaryLevelRepository,
     IFootnoteRepository footnoteRepository,
     IGeoJsonRepository geoJsonRepository,
     IIndicatorRepository indicatorRepository,
     IPersistenceHelper <StatisticsDbContext> persistenceHelper,
     ITimePeriodService timePeriodService,
     IUserService userService,
     ISubjectRepository subjectRepository,
     IReleaseDataFileRepository releaseDataFileRepository,
     IOptions <LocationsOptions> locationOptions,
     ILogger <ResultSubjectMetaService> logger) : base(filterItemRepository)
 {
     _contentDbContext          = contentDbContext;
     _boundaryLevelRepository   = boundaryLevelRepository;
     _footnoteRepository        = footnoteRepository;
     _geoJsonRepository         = geoJsonRepository;
     _indicatorRepository       = indicatorRepository;
     _persistenceHelper         = persistenceHelper;
     _timePeriodService         = timePeriodService;
     _userService               = userService;
     _subjectRepository         = subjectRepository;
     _releaseDataFileRepository = releaseDataFileRepository;
     _locationOptions           = locationOptions.Value;
     _logger = logger;
 }
 public ReleaseSubjectService(
     StatisticsDbContext statisticsDbContext,
     IFootnoteRepository footnoteRepository,
     SubjectDeleter subjectDeleter)
 {
     _statisticsDbContext = statisticsDbContext;
     _footnoteRepository  = footnoteRepository;
     _subjectDeleter      = subjectDeleter;
 }
 public ReleaseSubjectRepository(
     StatisticsDbContext statisticsDbContext,
     IFootnoteRepository footnoteRepository,
     SubjectDeleter?subjectDeleter = null)
 {
     _statisticsDbContext = statisticsDbContext;
     _footnoteRepository  = footnoteRepository;
     _subjectDeleter      = subjectDeleter ?? new SubjectDeleter();
 }
 private ReleaseSubjectRepository BuildReleaseSubjectService(
     StatisticsDbContext statisticsDbContext,
     IFootnoteRepository footnoteRepository = null,
     ReleaseSubjectRepository.SubjectDeleter subjectDeleter = null)
 {
     return(new ReleaseSubjectRepository(
                statisticsDbContext,
                footnoteRepository ?? new Mock <IFootnoteRepository>().Object,
                subjectDeleter ?? new Mock <ReleaseSubjectRepository.SubjectDeleter>().Object
                ));
 }
Ejemplo n.º 5
0
 public FootnoteService(
     StatisticsDbContext context,
     IPersistenceHelper <ContentDbContext> contentPersistenceHelper,
     IUserService userService,
     IFootnoteRepository footnoteRepository,
     IPersistenceHelper <StatisticsDbContext> statisticsPersistenceHelper,
     IGuidGenerator guidGenerator)
 {
     _context = context;
     _contentPersistenceHelper = contentPersistenceHelper;
     _userService                 = userService;
     _footnoteRepository          = footnoteRepository;
     _statisticsPersistenceHelper = statisticsPersistenceHelper;
     _guidGenerator               = guidGenerator;
 }
Ejemplo n.º 6
0
 public DataGuidanceSubjectService(IFilterRepository filterRepository,
                                   IIndicatorRepository indicatorRepository,
                                   StatisticsDbContext context,
                                   IPersistenceHelper <StatisticsDbContext> statisticsPersistenceHelper,
                                   IReleaseDataFileRepository releaseDataFileRepository,
                                   IFootnoteRepository footnoteRepository,
                                   ITimePeriodService timePeriodService)
 {
     _filterRepository            = filterRepository;
     _indicatorRepository         = indicatorRepository;
     _context                     = context;
     _statisticsPersistenceHelper = statisticsPersistenceHelper;
     _releaseDataFileRepository   = releaseDataFileRepository;
     _footnoteRepository          = footnoteRepository;
     _timePeriodService           = timePeriodService;
 }
Ejemplo n.º 7
0
 public ReleaseChecklistService(
     IPersistenceHelper <ContentDbContext> persistenceHelper,
     ITableStorageService tableStorageService,
     IUserService userService,
     IMetaGuidanceService metaGuidanceService,
     IFileRepository fileRepository,
     IFootnoteRepository footnoteRepository,
     IDataBlockService dataBlockService)
 {
     _persistenceHelper   = persistenceHelper;
     _tableStorageService = tableStorageService;
     _userService         = userService;
     _metaGuidanceService = metaGuidanceService;
     _fileRepository      = fileRepository;
     _footnoteRepository  = footnoteRepository;
     _dataBlockService    = dataBlockService;
 }
Ejemplo n.º 8
0
 private ReleaseChecklistService BuildReleaseChecklistService(
     IPersistenceHelper <ContentDbContext> persistenceHelper = null,
     ITableStorageService tableStorageService = null,
     IUserService userService = null,
     IMetaGuidanceService metaGuidanceService = null,
     IFileRepository fileRepository           = null,
     IFootnoteRepository footnoteRepository   = null,
     IDataBlockService dataBlockService       = null)
 {
     return(new ReleaseChecklistService(
                persistenceHelper ?? DefaultPersistenceHelperMock().Object,
                tableStorageService ?? new Mock <ITableStorageService>().Object,
                userService ?? MockUtils.AlwaysTrueUserService().Object,
                metaGuidanceService ?? new Mock <IMetaGuidanceService>().Object,
                fileRepository ?? new Mock <IFileRepository>().Object,
                footnoteRepository ?? new Mock <IFootnoteRepository>().Object,
                dataBlockService ?? new Mock <IDataBlockService>().Object
                ));
 }
Ejemplo n.º 9
0
 private ReleaseChecklistService BuildReleaseChecklistService(
     ContentDbContext contentDbContext,
     ITableStorageService tableStorageService = null,
     IUserService userService = null,
     IMetaGuidanceService metaGuidanceService = null,
     IFileRepository fileRepository           = null,
     IFootnoteRepository footnoteRepository   = null,
     IDataBlockService dataBlockService       = null)
 {
     return(new ReleaseChecklistService(
                new PersistenceHelper <ContentDbContext>(contentDbContext),
                tableStorageService ?? MockTableStorageService(new List <DatafileImport>()).Object,
                userService ?? MockUtils.AlwaysTrueUserService().Object,
                metaGuidanceService ?? new Mock <IMetaGuidanceService>().Object,
                fileRepository ?? new Mock <IFileRepository>().Object,
                footnoteRepository ?? new Mock <IFootnoteRepository>().Object,
                dataBlockService ?? new Mock <IDataBlockService>().Object
                ));
 }
        private FootnoteService SetupFootnoteService(
            StatisticsDbContext statisticsDbContext,
            ContentDbContext contentDbContext = null,
            IPersistenceHelper <ContentDbContext> contentPersistenceHelper = null,
            IUserService userService = null,
            IFootnoteRepository footnoteRepository = null,
            IPersistenceHelper <StatisticsDbContext> statisticsPersistenceHelper = null,
            IGuidGenerator guidGenerator = null)
        {
            var contentContext = contentDbContext ?? new Mock <ContentDbContext>().Object;

            return(new FootnoteService(
                       statisticsDbContext,
                       contentPersistenceHelper ?? new PersistenceHelper <ContentDbContext>(contentContext),
                       userService ?? MockUtils.AlwaysTrueUserService().Object,
                       footnoteRepository ?? new FootnoteRepository(statisticsDbContext),
                       statisticsPersistenceHelper ?? new PersistenceHelper <StatisticsDbContext>(statisticsDbContext),
                       guidGenerator ?? new SequentialGuidGenerator()
                       ));
        }
 public ReleaseChecklistService(
     ContentDbContext contentDbContext,
     IPersistenceHelper <ContentDbContext> persistenceHelper,
     IDataImportService dataImportService,
     IUserService userService,
     IDataGuidanceService dataGuidanceService,
     IReleaseDataFileRepository fileRepository,
     IMethodologyVersionRepository methodologyVersionRepository,
     IFootnoteRepository footnoteRepository,
     IDataBlockService dataBlockService)
 {
     _contentDbContext             = contentDbContext;
     _persistenceHelper            = persistenceHelper;
     _dataImportService            = dataImportService;
     _userService                  = userService;
     _dataGuidanceService          = dataGuidanceService;
     _fileRepository               = fileRepository;
     _methodologyVersionRepository = methodologyVersionRepository;
     _footnoteRepository           = footnoteRepository;
     _dataBlockService             = dataBlockService;
 }
 public ReplacementService(ContentDbContext contentDbContext,
                           StatisticsDbContext statisticsDbContext,
                           IFilterService filterService,
                           IIndicatorService indicatorService,
                           ILocationService locationService,
                           IFootnoteRepository footnoteRepository,
                           IReleaseService releaseService,
                           ITimePeriodService timePeriodService,
                           IPersistenceHelper <ContentDbContext> contentPersistenceHelper,
                           IUserService userService)
 {
     _contentDbContext         = contentDbContext;
     _statisticsDbContext      = statisticsDbContext;
     _filterService            = filterService;
     _indicatorService         = indicatorService;
     _locationService          = locationService;
     _footnoteRepository       = footnoteRepository;
     _releaseService           = releaseService;
     _timePeriodService        = timePeriodService;
     _contentPersistenceHelper = contentPersistenceHelper;
     _userService = userService;
 }
 private static ReleaseChecklistService BuildReleaseChecklistService(
     ContentDbContext contentDbContext,
     IDataImportService dataImportService                       = null,
     IUserService userService                                   = null,
     IDataGuidanceService dataGuidanceService                   = null,
     IReleaseDataFileRepository releaseDataFileRepository       = null,
     IMethodologyVersionRepository methodologyVersionRepository = null,
     IFootnoteRepository footnoteRepository                     = null,
     IDataBlockService dataBlockService                         = null)
 {
     return(new(
                contentDbContext,
                new PersistenceHelper <ContentDbContext>(contentDbContext),
                dataImportService ?? new Mock <IDataImportService>().Object,
                userService ?? MockUtils.AlwaysTrueUserService().Object,
                dataGuidanceService ?? new Mock <IDataGuidanceService>().Object,
                releaseDataFileRepository ?? new Mock <IReleaseDataFileRepository>().Object,
                methodologyVersionRepository ?? new Mock <IMethodologyVersionRepository>().Object,
                footnoteRepository ?? new Mock <IFootnoteRepository>().Object,
                dataBlockService ?? new Mock <IDataBlockService>().Object
                ));
 }
 public ResultSubjectMetaService(IBoundaryLevelService boundaryLevelService,
                                 IFilterItemService filterItemService,
                                 IFootnoteRepository footnoteRepository,
                                 IGeoJsonService geoJsonService,
                                 IIndicatorService indicatorService,
                                 ILocationService locationService,
                                 IPersistenceHelper <StatisticsDbContext> persistenceHelper,
                                 ITimePeriodService timePeriodService,
                                 IUserService userService,
                                 ISubjectService subjectService,
                                 ILogger <ResultSubjectMetaService> logger,
                                 IMapper mapper) : base(boundaryLevelService, filterItemService, geoJsonService)
 {
     _boundaryLevelService = boundaryLevelService;
     _footnoteRepository   = footnoteRepository;
     _indicatorService     = indicatorService;
     _locationService      = locationService;
     _persistenceHelper    = persistenceHelper;
     _timePeriodService    = timePeriodService;
     _userService          = userService;
     _subjectService       = subjectService;
     _logger = logger;
     _mapper = mapper;
 }