Esempio n. 1
0
 public ReleaseService(
     ContentDbContext context,
     IMapper mapper,
     IPersistenceHelper <ContentDbContext> persistenceHelper,
     IUserService userService,
     IReleaseRepository repository,
     IReleaseFileRepository releaseFileRepository,
     ISubjectRepository subjectRepository,
     IReleaseDataFileService releaseDataFileService,
     IReleaseFileService releaseFileService,
     IDataImportService dataImportService,
     IFootnoteService footnoteService,
     StatisticsDbContext statisticsDbContext,
     IDataBlockService dataBlockService,
     IReleaseSubjectRepository releaseSubjectRepository,
     IGuidGenerator guidGenerator,
     IBlobCacheService cacheService)
 {
     _context                  = context;
     _mapper                   = mapper;
     _persistenceHelper        = persistenceHelper;
     _userService              = userService;
     _repository               = repository;
     _releaseFileRepository    = releaseFileRepository;
     _subjectRepository        = subjectRepository;
     _releaseDataFileService   = releaseDataFileService;
     _releaseFileService       = releaseFileService;
     _dataImportService        = dataImportService;
     _footnoteService          = footnoteService;
     _statisticsDbContext      = statisticsDbContext;
     _dataBlockService         = dataBlockService;
     _releaseSubjectRepository = releaseSubjectRepository;
     _guidGenerator            = guidGenerator;
     _cacheService             = cacheService;
 }
 public TableBuilderController(
     ITableBuilderService tableBuilderService,
     IDataBlockService dataBlockService,
     IPersistenceHelper <ContentDbContext> contentPersistenceHelper)
 {
     _tableBuilderService      = tableBuilderService;
     _dataBlockService         = dataBlockService;
     _contentPersistenceHelper = contentPersistenceHelper;
 }
Esempio n. 3
0
 public ReleaseFileController(
     IPersistenceHelper <ContentDbContext> persistenceHelper,
     IDataBlockService dataBlockService,
     IReleaseFileService releaseFileService)
 {
     _persistenceHelper  = persistenceHelper;
     _dataBlockService   = dataBlockService;
     _releaseFileService = releaseFileService;
 }
Esempio n. 4
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;
 }
Esempio n. 5
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
                ));
 }
Esempio n. 6
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
                ));
 }
Esempio n. 7
0
 public ReleasesController(
     IReleaseService releaseService,
     IReleaseFileService releaseFileService,
     IReleaseDataFileService releaseDataFileService,
     IReleaseStatusService releaseStatusService,
     IReleaseChecklistService releaseChecklistService,
     UserManager <ApplicationUser> userManager,
     IDataBlockService dataBlockService,
     IImportService importService)
 {
     _releaseService          = releaseService;
     _releaseDataFileService  = releaseDataFileService;
     _releaseFileService      = releaseFileService;
     _releaseStatusService    = releaseStatusService;
     _releaseChecklistService = releaseChecklistService;
     _userManager             = userManager;
     _dataBlockService        = dataBlockService;
     _importService           = importService;
 }
 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;
 }
 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
                ));
 }
 private ReleaseService BuildReleaseService(
     ContentDbContext context             = null,
     IMapper mapper                       = null,
     IPublishingService publishingService = null,
     IPersistenceHelper <ContentDbContext> persistenceHelper = null,
     IUserService userService                         = null,
     IReleaseRepository releaseRepository             = null,
     ISubjectService subjectService                   = null,
     ITableStorageService tableStorageService         = null,
     IReleaseFileService releaseFileService           = null,
     IReleaseDataFileService releaseDataFileService   = null,
     IImportStatusService importStatusService         = null,
     IFootnoteService footnoteService                 = null,
     StatisticsDbContext statisticsDbContext          = null,
     IDataBlockService dataBlockService               = null,
     IReleaseChecklistService releaseChecklistService = null,
     IReleaseSubjectService releaseSubjectService     = null)
 {
     return(new ReleaseService(
                context ?? new Mock <ContentDbContext>().Object,
                mapper ?? AdminMapper(),
                publishingService ?? new Mock <IPublishingService>().Object,
                persistenceHelper ?? DefaultPersistenceHelperMock().Object,
                userService ?? new Mock <IUserService>().Object,
                releaseRepository ?? new Mock <IReleaseRepository>().Object,
                subjectService ?? new Mock <ISubjectService>().Object,
                tableStorageService ?? new Mock <ITableStorageService>().Object,
                releaseDataFileService ?? new Mock <IReleaseDataFileService>().Object,
                releaseFileService ?? new Mock <IReleaseFileService>().Object,
                importStatusService ?? new Mock <IImportStatusService>().Object,
                footnoteService ?? new Mock <IFootnoteService>().Object,
                statisticsDbContext ?? new Mock <StatisticsDbContext>().Object,
                dataBlockService ?? new Mock <IDataBlockService>().Object,
                releaseChecklistService ?? new Mock <IReleaseChecklistService>().Object,
                releaseSubjectService ?? new Mock <IReleaseSubjectService>().Object,
                new SequentialGuidGenerator()
                ));
 }
Esempio n. 11
0
 // TODO EES-212 - ReleaseService needs breaking into smaller services as it feels like it is now doing too
 // much work and has too many dependencies
 public ReleaseService(
     ContentDbContext context,
     IMapper mapper,
     IPublishingService publishingService,
     IPersistenceHelper <ContentDbContext> persistenceHelper,
     IUserService userService,
     IReleaseRepository repository,
     ISubjectService subjectService,
     ITableStorageService coreTableStorageService,
     IReleaseDataFileService releaseDataFileService,
     IReleaseFileService releaseFileService,
     IImportStatusService importStatusService,
     IFootnoteService footnoteService,
     StatisticsDbContext statisticsDbContext,
     IDataBlockService dataBlockService,
     IReleaseChecklistService releaseChecklistService,
     IReleaseSubjectService releaseSubjectService,
     IGuidGenerator guidGenerator)
 {
     _context                 = context;
     _publishingService       = publishingService;
     _mapper                  = mapper;
     _persistenceHelper       = persistenceHelper;
     _userService             = userService;
     _repository              = repository;
     _subjectService          = subjectService;
     _coreTableStorageService = coreTableStorageService;
     _releaseDataFileService  = releaseDataFileService;
     _releaseFileService      = releaseFileService;
     _importStatusService     = importStatusService;
     _footnoteService         = footnoteService;
     _statisticsDbContext     = statisticsDbContext;
     _dataBlockService        = dataBlockService;
     _releaseChecklistService = releaseChecklistService;
     _releaseSubjectService   = releaseSubjectService;
     _guidGenerator           = guidGenerator;
 }
 public DataBlocksController(IDataBlockService dataBlockService)
 {
     _dataBlockService = dataBlockService;
 }