public GalleryAccountManager( IOptionsSnapshot <AccountDeleteConfiguration> accountDeleteConfigurationAccessor, IDeleteAccountService deleteAccountService, IUserEvaluator userEvaluator, IAccountDeleteTelemetryService telemetryService, ILogger <GalleryAccountManager> logger) { _accountDeleteConfigurationAccessor = accountDeleteConfigurationAccessor ?? throw new ArgumentNullException(nameof(accountDeleteConfigurationAccessor)); _deleteAccountService = deleteAccountService ?? throw new ArgumentNullException(nameof(deleteAccountService)); _userEvaluator = userEvaluator ?? throw new ArgumentNullException(nameof(userEvaluator)); _telemetryService = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public bool AddEvaluator(IUserEvaluator userEvaluator) { if (_evaluatorList.ContainsKey(userEvaluator.EvaluatorId)) { _logger.LogWarning("Evaluator {EvaluatorId} was attempted to be added to aggregate more than once!", userEvaluator.EvaluatorId); return(false); } _logger.LogInformation("Adding evaluator {EvaluatorName} with id {EvaluatorId} to aggregate.", userEvaluator.GetType().FullName, userEvaluator.EvaluatorId); _evaluatorList.Add(userEvaluator.EvaluatorId, userEvaluator); return(true); }
public bool AddEvaluator(IUserEvaluator userEvaluator) { return(_evaluatorList.Add(userEvaluator)); }