public AuditDataCleanUpService(IScheduledJobsConfiguration config, IPaymentsDataContext dataContext, IEndpointInstanceFactory endpointInstanceFactory, IPaymentLogger paymentLogger) { this.dataContext = dataContext ?? throw new ArgumentNullException(nameof(dataContext)); this.endpointInstanceFactory = endpointInstanceFactory ?? throw new ArgumentNullException(nameof(endpointInstanceFactory)); this.config = config ?? throw new ArgumentNullException(nameof(config)); this.paymentLogger = paymentLogger ?? throw new ArgumentNullException(nameof(paymentLogger)); }
public PeriodEndJobContextMessageHandler(IPaymentLogger logger, IEndpointInstanceFactory endpointInstanceFactory, IPeriodEndJobClient jobClient, IJobStatusService jobStatusService) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.endpointInstanceFactory = endpointInstanceFactory ?? throw new ArgumentNullException(nameof(endpointInstanceFactory)); this.jobClient = jobClient ?? throw new ArgumentNullException(nameof(jobClient)); this.jobStatusService = jobStatusService ?? throw new ArgumentNullException(nameof(jobStatusService)); }
public ManageLevyAccountBalanceService(IAccountApiClient accountApiClient, IPaymentLogger logger, ILevyAccountBulkCopyRepository levyAccountBulkWriter, ILevyFundingSourceRepository levyFundingSourceRepository, int batchSize, IEndpointInstanceFactory endpointInstanceFactory) { this.accountApiClient = accountApiClient ?? throw new ArgumentNullException(nameof(accountApiClient)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.levyAccountBulkWriter = levyAccountBulkWriter ?? throw new ArgumentNullException(nameof(levyAccountBulkWriter)); this.levyFundingSourceRepository = levyFundingSourceRepository ?? throw new ArgumentNullException(nameof(levyFundingSourceRepository)); this.batchSize = batchSize; this.endpointInstanceFactory = endpointInstanceFactory ?? throw new ArgumentNullException(nameof(endpointInstanceFactory)); }
private static async Task RunLevyAccountImport(IEndpointInstanceFactory endpointInstanceFactory, IScheduledJobsConfiguration config, IPaymentLogger log) { try { var command = new ImportEmployerAccounts(); var endpointInstance = await endpointInstanceFactory.GetEndpointInstance().ConfigureAwait(false); await endpointInstance.Send(config.LevyAccountBalanceEndpoint, command).ConfigureAwait(false); } catch (Exception e) { log.LogError("Error in LevyAccountImport", e); throw; } }
public ManageLevyAccountBalanceService(ILevyFundingSourceRepository repository, IAccountApiClient accountApiClient, IPaymentLogger logger, ILevyAccountBulkCopyRepository levyAccountBulkWriter, int batchSize, IEndpointInstanceFactory endpointInstanceFactory) { this.repository = repository; this.accountApiClient = accountApiClient; this.logger = logger; this.levyAccountBulkWriter = levyAccountBulkWriter; this.batchSize = batchSize; this.endpointInstanceFactory = endpointInstanceFactory; retryPolicy = Policy.Handle <Exception>().WaitAndRetryAsync(5, i => TimeSpan.FromMinutes(1)); }
public ApprenticeshipProcessor(IPaymentLogger logger, IMapper mapper, IApprenticeshipService apprenticeshipService, IEndpointInstanceFactory endpointInstanceFactory, IApprenticeshipApprovedUpdatedService apprenticeshipApprovedUpdatedService, IApprenticeshipDataLockTriageService apprenticeshipDataLockTriageService, IApprenticeshipStoppedService apprenticeshipStoppedService, IApprenticeshipPauseService apprenticeshipPauseService, IApprenticeshipResumedService apprenticeshipResumedService) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); this.apprenticeshipService = apprenticeshipService ?? throw new ArgumentNullException(nameof(apprenticeshipService)); this.endpointInstanceFactory = endpointInstanceFactory ?? throw new ArgumentNullException(nameof(endpointInstanceFactory)); this.apprenticeshipApprovedUpdatedService = apprenticeshipApprovedUpdatedService ?? throw new ArgumentNullException(nameof(apprenticeshipApprovedUpdatedService)); this.apprenticeshipDataLockTriageService = apprenticeshipDataLockTriageService ?? throw new ArgumentNullException(nameof(apprenticeshipDataLockTriageService)); this.apprenticeshipStoppedService = apprenticeshipStoppedService ?? throw new ArgumentNullException(nameof(apprenticeshipStoppedService)); this.apprenticeshipPauseService = apprenticeshipPauseService ?? throw new ArgumentNullException(nameof(apprenticeshipPauseService)); this.apprenticeshipResumedService = apprenticeshipResumedService ?? throw new ArgumentNullException(nameof(apprenticeshipResumedService)); }
public JobContextMessageHandler(IPaymentLogger logger, IFileService azureFileService, IJsonSerializationService serializationService, IEndpointInstanceFactory factory, IEarningsJobClientFactory jobClientFactory, ITelemetry telemetry, IBulkWriter <SubmittedLearnerAimModel> submittedAimWriter, ISubmittedLearnerAimBuilder submittedLearnerAimBuilder, ISubmittedLearnerAimRepository submittedLearnerAimRepository, IJobStatusService jobStatusService) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.azureFileService = azureFileService ?? throw new ArgumentNullException(nameof(azureFileService)); this.serializationService = serializationService ?? throw new ArgumentNullException(nameof(serializationService)); this.factory = factory ?? throw new ArgumentNullException(nameof(factory)); this.jobClientFactory = jobClientFactory ?? throw new ArgumentNullException(nameof(jobClientFactory)); this.telemetry = telemetry ?? throw new ArgumentNullException(nameof(telemetry)); this.submittedAimWriter = submittedAimWriter; this.submittedLearnerAimBuilder = submittedLearnerAimBuilder; this.submittedLearnerAimRepository = submittedLearnerAimRepository; this.jobStatusService = jobStatusService; }
public static async Task HttpLevyAccountImport([HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req, [Inject] IEndpointInstanceFactory endpointInstanceFactory, [Inject] IScheduledJobsConfiguration config, [Inject] IPaymentLogger log) { await RunLevyAccountImport(endpointInstanceFactory, config, log); }
public static async Task Run([TimerTrigger("%LevyAccountSchedule%", RunOnStartup = false)] TimerInfo myTimer, [Inject] IEndpointInstanceFactory endpointInstanceFactory, [Inject] IScheduledJobsConfiguration config, [Inject] IPaymentLogger log) { await RunLevyAccountImport(endpointInstanceFactory, config, log); }
public JobStatusEventPublisher(IEndpointInstanceFactory factory, IPaymentLogger logger) { this.factory = factory ?? throw new ArgumentNullException(nameof(factory)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public StatelessEndpointCommunicationListener(IEndpointInstanceFactory endpointInstanceFactory, IApplicationConfiguration config, IPaymentLogger logger) { this.endpointInstanceFactory = endpointInstanceFactory ?? throw new ArgumentNullException(nameof(endpointInstanceFactory)); this.config = config ?? throw new ArgumentNullException(nameof(config)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public StatefulEndpointCommunicationListener(IEndpointInstanceFactory endpointInstanceFactory, IApplicationConfiguration config) { this.endpointInstanceFactory = endpointInstanceFactory ?? throw new ArgumentNullException(nameof(endpointInstanceFactory)); this.config = config ?? throw new ArgumentNullException(nameof(config)); }