Esempio n. 1
0
        public RecaptchaManualModeSource()
        {
            m_requestHandler             = new RequestHandler();
            m_requestHandler.TokenFound += (s, e) =>
            {
                RecaptchaManualSourceTask task = m_currentTask;

                lock (m_lock)
                {
                    m_currentTask = null;
                }

                task.Solution = e.Token;
            };
        }
Esempio n. 2
0
        public ICaptchaSolutionSourceTask GetSolution(object parameter)
        {
            RecaptchaManualSourceTask task = new RecaptchaManualSourceTask()
            {
                Parameter = parameter as RecaptchaParameter
            };

            if (task.Parameter == null)
            {
                throw new ArgumentException("Parameter has wrong type or Null");
            }

            CurrentTask = task;

            if (IsEnabled)
            {
                Reload();
            }

            return(task);
        }