public LoggingAction(ILogger <LoggingAction> logger, IOptions <LoggingOptions> loggingOptions, IOptions <LoggingSecretOptions> loggingSecretOptions, IOptions <InstagramOptions> instagramOptions, SeleniumWrapper seleniumWrapper, PersistenceManager persistenceManager) // DI : constructor must be public
        {
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
            _logger.LogTrace("new LoggingAction()");
            _loggingOptions       = loggingOptions?.Value ?? throw new ArgumentNullException(nameof(loggingOptions));
            _loggingSecretOptions = loggingSecretOptions?.Value ?? throw new ArgumentNullException(nameof(loggingSecretOptions));
            _instagramOptions     = instagramOptions.Value ?? throw new ArgumentNullException(nameof(instagramOptions));
            _seleniumWrapper      = seleniumWrapper ?? throw new ArgumentNullException(nameof(seleniumWrapper));
            _persistenceManager   = persistenceManager ?? throw new ArgumentNullException(nameof(persistenceManager));

            // config check
            if (string.IsNullOrWhiteSpace(_loggingOptions.User))
            {
                throw new ArgumentNullException(nameof(loggingOptions), "User is empty !");
            }
        }
 public LoadingAction(ILogger <LoadingAction> logger, SeleniumWrapper seleniumWrapper, PersistenceManager persistenceManager) // DI : constructor must be public
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _logger.LogTrace("new LoadingAction()");
     _seleniumWrapper    = seleniumWrapper ?? throw new ArgumentNullException(nameof(seleniumWrapper));
     _persistenceManager = persistenceManager ?? throw new ArgumentNullException(nameof(persistenceManager));
 }