Пример #1
0
 public CampaignCacheService(
     ILogFactory logFactory,
     IConnectionMultiplexer connectionMultiplexer,
     ICampaignClient campaignClient,
     IActiveCampaignRepository activeCampaignRepository,
     string redisInstanceName,
     string redisConnectionString,
     IMapper mapper)
 {
     _log                      = logFactory.CreateLog(this);
     _mapper                   = mapper;
     _campaignClient           = campaignClient;
     _activeCampaignRepository = activeCampaignRepository;
     _connectionMultiplexer    = connectionMultiplexer;
     _db = _connectionMultiplexer.GetDatabase();
     _redisInstanceName = redisInstanceName ??
                          throw new ArgumentNullException(nameof(redisInstanceName));
     _redisConnectionString = redisConnectionString
                              ?? throw new ArgumentNullException(nameof(redisConnectionString));
 }
 public CampaignService(
     ICampaignClient campaignClient,
     ICampaignCompletionService campaignCompletionService,
     IConditionCompletionService conditionCompletionService,
     IBonusOperationService bonusOperationService,
     IRabbitPublisher <ParticipatedInCampaignEvent> rabbitParticipatedInCampaignEventPublisher,
     IBonusCalculatorService bonusCalculatorService,
     ILogFactory logFactor,
     IActiveCampaignRepository activeCampaignRepository,
     ICampaignCacheService campaignCacheService,
     IMapper mapper)
 {
     _campaignCompletionService  = campaignCompletionService;
     _conditionCompletionService = conditionCompletionService;
     _bonusOperationService      = bonusOperationService;
     _rabbitParticipatedInCampaignEventPublisher = rabbitParticipatedInCampaignEventPublisher;
     _bonusCalculatorService = bonusCalculatorService;
     _campaignClient         = campaignClient;
     _log = logFactor.CreateLog(this);
     _activeCampaignRepository = activeCampaignRepository;
     _campaignCacheService     = campaignCacheService;
     _mapper = mapper;
 }