Пример #1
0
        public void SetValidationState(string response)
        {
            var validationState = _validationState as ValidationState;
            if (validationState == null)
                throw new ApplicationException("invalid validation state type");

            validationState.Init(response);
            _currentState = _validationState;
        }
Пример #2
0
        public StateContext(ILogger logger, IProxyManager proxyManager, ICaptchaService captchaService)
        {
            _logger = logger;
            ProxyManager = proxyManager;
            CaptchaService = captchaService;

            _restartState = new RestartState(this);
            _validationState = new ValidationState(this);
        }
Пример #3
0
 public void SetFinishState()
 {
     _currentState = null;
 }
Пример #4
0
 public void SetRestartState()
 {
     _currentState = _restartState;
 }
Пример #5
0
 public void SetFinishState()
 {
     _currentState = null;
 }
Пример #6
0
 public void SetRestartState()
 {
     _currentState = _restartState;
 }