public ActivityAction(ILogger <ActivityAction> logger, IOptions <InstagramOptions> instagramOptions, SeleniumWrapper seleniumWrapper) // DI : constructor must be public { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger.LogTrace("new ActivityAction()"); _instagramOptions = instagramOptions.Value ?? throw new ArgumentNullException(nameof(instagramOptions)); _seleniumWrapper = seleniumWrapper ?? throw new ArgumentNullException(nameof(seleniumWrapper)); }
public FollowBackAction(ILogger <FollowBackAction> logger, IOptions <FollowBackOptions> followBackOptions, IOptions <InstagramOptions> instagramOptions, SeleniumWrapper seleniumWrapper, WaitAction waitAction) // DI : constructor must be public { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger.LogTrace("new FollowBackAction()"); _followBackOptions = followBackOptions.Value ?? throw new ArgumentNullException(nameof(followBackOptions)); _instagramOptions = instagramOptions.Value ?? throw new ArgumentNullException(nameof(instagramOptions)); _seleniumWrapper = seleniumWrapper ?? throw new ArgumentNullException(nameof(seleniumWrapper)); _waitAction = waitAction ?? throw new ArgumentNullException(nameof(waitAction)); }
public UnfollowUnfollowersAction(ILogger<UnfollowUnfollowersAction> logger, IOptions<UnfollowUnfollowersOptions> unfollowUnfollowersOptions, IOptions<InstagramOptions> instagramOptions, SeleniumWrapper seleniumWrapper, PersistenceManager persistenceManager, WaitAction waitAction) // DI : constructor must be public { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger.LogTrace("new UnfollowUnfollowers()"); _unfollowUnfollowersOptions = unfollowUnfollowersOptions.Value ?? throw new ArgumentNullException(nameof(unfollowUnfollowersOptions)); _instagramOptions = instagramOptions.Value ?? throw new ArgumentNullException(nameof(instagramOptions)); _seleniumWrapper = seleniumWrapper ?? throw new ArgumentNullException(nameof(seleniumWrapper)); _persistenceManager = persistenceManager ?? throw new ArgumentNullException(nameof(persistenceManager)); _waitAction = waitAction ?? throw new ArgumentNullException(nameof(waitAction)); }
public HomeAction(ILogger <HomeAction> logger, IOptions <HomePageOptions> homePageActionsOptions, IOptions <InstagramOptions> instagramOptions, SeleniumWrapper seleniumWrapper, WaitAction waitAction) // DI : constructor must be public { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger.LogTrace("new HomeAction()"); _homePageActionsOptions = homePageActionsOptions.Value ?? throw new ArgumentNullException(nameof(homePageActionsOptions)); _instagramOptions = instagramOptions.Value ?? throw new ArgumentNullException(nameof(instagramOptions)); _seleniumWrapper = seleniumWrapper ?? throw new ArgumentNullException(nameof(seleniumWrapper)); _waitAction = waitAction ?? throw new ArgumentNullException(nameof(waitAction)); // default DoLike = true; }
public ExplorePhotosAction(ILogger <ExplorePhotosAction> logger, IOptions <ExplorePhotosOptions> explorePhotosPageActionsOptions, IOptions <InstagramOptions> instagramOptions, SeleniumWrapper seleniumWrapper, WaitAction waitAction) // DI : constructor must be public { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger.LogTrace("new ExplorePhotosAction()"); _explorePhotosPageActionsOptions = explorePhotosPageActionsOptions.Value ?? throw new ArgumentNullException(nameof(explorePhotosPageActionsOptions)); _instagramOptions = instagramOptions.Value ?? throw new ArgumentNullException(nameof(instagramOptions)); _seleniumWrapper = seleniumWrapper ?? throw new ArgumentNullException(nameof(seleniumWrapper)); _waitAction = waitAction ?? throw new ArgumentNullException(nameof(waitAction)); // default DoFollow = true; DoLike = true; }
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 !"); } }