Esempio n. 1
0
 /// <summary>
 /// Historic Data Deletion Processor
 /// </summary>
 /// <param name="reportDataService">Report Data Service</param>
 /// <param name="clientTokenHandler">GCP Client Token Hanlder</param>
 /// <param name="documentDeletionProcessor">Document Deletion Processor</param>
 /// <param name="logger">Event Logger</param>
 public HistoricDataDeletionProcessor(IReportDataService reportDataService, IClientTokenHandler clientTokenHandler, IDocumentDeletionProcessor documentDeletionProcessor, ILogger <HistoricDataDeletionProcessor> logger)
 {
     _reportDataService         = reportDataService;
     _clientTokenHandler        = clientTokenHandler;
     _documentDeletionProcessor = documentDeletionProcessor;
     _logger = logger;
 }
Esempio n. 2
0
        /// <summary>
        /// Admin Controller
        /// </summary>
        /// <param name="reportDataService">Report Data Service</param>
        /// <param name="documentDeletionProcessor">Document Deletion Service</param>
        /// <param name="documentUpsertProcessor">Document Upsert Processor</param>
        /// <param name="clientTokenHandler">GCP Token Handler</param>
        /// <param name="historicDocumentProcessor">Historic Document Processor</param>
        /// <param name="messagePublisher">Message Publisher</param>
        /// <param name="configuration">Configuration</param>
        /// <param name="logger">Event Logger</param>
        public AdminController(IReportDataService reportDataService,
                               IDocumentDeletionProcessor documentDeletionProcessor,
                               IDocumentUpsertProcessor documentUpsertProcessor,
                               IClientTokenHandler clientTokenHandler,
                               IHistoricDataDeletionProcessor historicDocumentProcessor,
                               IMessagePublisher messagePublisher,
                               IConfiguration configuration,
                               ILogger <AdminController> logger)
        {
            _reportDataService         = reportDataService;
            _documentDeletionProcessor = documentDeletionProcessor;
            _documentUpsertProcessor   = documentUpsertProcessor;
            _clientTokenHandler        = clientTokenHandler;
            _historicDocumentProcessor = historicDocumentProcessor;

            // var services = serviceProvider.GetServices<IMessagePublisher>();
            // _messagePublisher = services.First(s => s.GetType() == typeof(MessagePublisher) && !s.IsGCPVersion);
            // _messagePublisherGCP = services.First(s => s.GetType() == typeof(MessagePublisher) && s.IsGCPVersion);
            _messagePublisher = messagePublisher;
            _configuration    = configuration;
            _logger           = logger;

            _gcpAserviceAPI = configuration.GetValue <string>("GcpAudience");
        }