Exemplo n.º 1
0
 public JsonStrike(
     ICatalogClient catalogClient,
     IRegistrationUpdater updater,
     string packageId)
 {
     _catalogClient = catalogClient;
     _updater       = updater;
     _packageId     = packageId;
     _urls          = new List <string>();
 }
        public RegistrationCollectorLogic(
            CommitCollectorUtility utility,
            IRegistrationUpdater updater,
            IOptionsSnapshot <Catalog2RegistrationConfiguration> options,
            ILogger <RegistrationCollectorLogic> logger)
        {
            _utility = utility ?? throw new ArgumentNullException(nameof(utility));
            _updater = updater ?? throw new ArgumentNullException(nameof(updater));
            _options = options ?? throw new ArgumentNullException(nameof(options));
            _logger  = logger ?? throw new ArgumentNullException(nameof(logger));

            if (_options.Value.MaxConcurrentIds <= 0)
            {
                throw new ArgumentOutOfRangeException(
                          nameof(options),
                          $"The {nameof(Catalog2RegistrationConfiguration.MaxConcurrentIds)} must be greater than zero.");
            }
        }