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; }
public StateContext(ILogger logger, IProxyManager proxyManager, ICaptchaService captchaService) { _logger = logger; ProxyManager = proxyManager; CaptchaService = captchaService; _restartState = new RestartState(this); _validationState = new ValidationState(this); }
public void SetFinishState() { _currentState = null; }
public void SetRestartState() { _currentState = _restartState; }