Exemple #1
0
        public LoadBalancerFactory(
            IConfiguration _configuration,
            IIpHasher _ipHasher,
            IHttpContextAccessor _httpContextAccessor,
            IHttpClientFactory _httpClientFactory)
        {
            if (StaticFields.LoadBalancer == null)
            {
                StaticFields.LoadBalancer = _configuration.GetSection("LoadBalancer").Get <LoadBalance>();
            }

            ipHasher            = _ipHasher;
            httpContextAccessor = _httpContextAccessor;
            httpClientFactory   = _httpClientFactory;
        }
Exemple #2
0
 public BoardModel(
     IpHasherFactory ipHasherFactory,
     TripCodeHasher tripCodeHasher,
     ICookieStorage cookieStorage,
     IGetIp getIp,
     IThreadService threadService,
     IPostService postService,
     IBannedImageLogger bannedImageLogger,
     IUploadMapper uploadMapper)
 {
     this.ipHasher          = ipHasherFactory.GetHasher();
     this.tripCodeHasher    = tripCodeHasher;
     this.cookieStorage     = cookieStorage;
     this.getIp             = getIp;
     this.threadService     = threadService;
     this.postService       = postService;
     this.bannedImageLogger = bannedImageLogger;
     this.uploadMapper      = uploadMapper;
 }
Exemple #3
0
 public BannedModel(IUserService userService, IIpHasher hasher, IGetIp getIp)
 {
     this.userService = userService;
     this.hasher      = hasher;
     this.getIp       = getIp;
 }