コード例 #1
0
ファイル: BootStrap.cs プロジェクト: ddotan/KeepAliveSystem
 public static void StartChecker(string i_CheckerName, IAppChecker i_AppChecker)
 {
     Console.WriteLine("[Checker] : " + i_CheckerName + " Started.");
     new Thread(() =>
     {
         i_AppChecker.Start();
     }).Start();
 }
コード例 #2
0
 public static void StartChecker(string i_CheckerName, IAppChecker i_AppChecker)
 {
     Console.WriteLine("[Checker] : " + i_CheckerName + " Started.");
     new Thread(() =>
     {
         i_AppChecker.Start();
     }).Start();
 }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
        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;
        }
コード例 #6
0
 public SimCaptchaService Set(IAppChecker appChecker)
 {
     this.AppChecker = appChecker;
     return(this);
 }