public RequiredPaymentsService(ActorService actorService, ActorId actorId, IPaymentLogger paymentLogger, IApprenticeshipKeyService apprenticeshipKeyService, Func <IPaymentHistoryRepository> paymentHistoryRepositoryFactory, IApprenticeshipContractType2EarningsEventProcessor contractType2EarningsEventProcessor, IApprenticeshipAct1RedundancyEarningsEventProcessor act1RedundancyEarningsEventProcessor, IFunctionalSkillEarningsEventProcessor functionalSkillEarningsEventProcessor, IPayableEarningEventProcessor payableEarningEventProcessor, IRefundRemovedLearningAimProcessor refundRemovedLearningAimProcessor, ITelemetry telemetry) : base(actorService, actorId) { this.paymentLogger = paymentLogger; this.paymentHistoryRepositoryFactory = paymentHistoryRepositoryFactory; this.contractType2EarningsEventProcessor = contractType2EarningsEventProcessor; this.act1RedundancyEarningsEventProcessor = act1RedundancyEarningsEventProcessor; this.functionalSkillEarningsEventProcessor = functionalSkillEarningsEventProcessor; this.payableEarningEventProcessor = payableEarningEventProcessor; this.refundRemovedLearningAimProcessor = refundRemovedLearningAimProcessor; this.telemetry = telemetry; apprenticeshipKeyString = actorId.GetStringId(); apprenticeshipKey = apprenticeshipKeyService.ParseApprenticeshipKey(apprenticeshipKeyString); logSafeApprenticeshipKeyString = CreateLogSafeApprenticeshipKeyString(apprenticeshipKey); }
public ApprenticeshipKey GetCurrentKey() { if (apprenticeshipKey == null) { apprenticeshipKey = apprenticeshipKeyService.ParseApprenticeshipKey(actorIdProvider.Current.GetStringId()); } return(apprenticeshipKey); }