public static void StartChecker(string i_CheckerName, IAppChecker i_AppChecker) { Console.WriteLine("[Checker] : " + i_CheckerName + " Started."); new Thread(() => { i_AppChecker.Start(); }).Start(); }
public SimCaptchaService(ISimCaptchaOptions options, ICacheHelper cacheHelper, IVCodeImage vCodeImage, IJsonHelper jsonHelper, IAppChecker appChecker, IRandomCode randomCode) { this._options = options; this._cacheHelper = cacheHelper; this.VCodeImage = vCodeImage; this.JsonHelper = jsonHelper; this.AppChecker = appChecker; this.RandomCode = randomCode; this._encryptHelper = new AesEncryptHelper(); }
public SimCaptchaService(ISimCaptchaOptions options, ICache cache, IVCodeImage vCodeImage, IJsonHelper jsonHelper) { this._options = options; this._cacheHelper = new CacheHelper(cache); this.VCodeImage = vCodeImage; this.JsonHelper = jsonHelper; this.AppChecker = new DefaultAppChecker((SimCaptchaOptions)options); this.RandomCode = new RandomCodeHanZi(); this._encryptHelper = new AesEncryptHelper(); }
public VCodeController( IOptions <SimCaptchaOptions> options, IHttpContextAccessor accessor, IMemoryCache memoryCache) { _options = options.Value; this._service = new SimCaptchaService( new LocalCache(memoryCache) { TimeOut = options.Value.ExpiredSec }, new AspNetCoreVCodeImage(), new AspNetCoreJsonHelper(), options.Value); this._appChecker = new DefaultAppChecker(options.Value); this._accessor = accessor; }
public SimCaptchaService Set(IAppChecker appChecker) { this.AppChecker = appChecker; return(this); }