//protected BaseSiteController(ICookieRepository cookieRepository)
        //{
        //    _cookieRepository = cookieRepository;
        //}

        protected BaseSiteController(ICookieRepository cookieRepository, IConfiguration config)
        {
            _cookieRepository = cookieRepository;
            _config           = config;

            this.GameId = Convert.ToInt32(_config["GameId"]);
        }
Exemplo n.º 2
0
 public CookiesController(ICookieRepository cookieRepo, IHubContext <CookieHub> cookieHub, IUserRepository userRepo, IConnectionMapping <string> connectionMapping,
                          IClientRepository clientRepo, IResourceRepository resourceRepo, ICookieTemplateRepository cookieTemplateRepo)
 {
     _cookieRepo         = cookieRepo;
     _cookieHub          = cookieHub;
     _userRepo           = userRepo;
     _connectionMapping  = connectionMapping;
     _clientRepo         = clientRepo;
     _resourceRepo       = resourceRepo;
     _cookieTemplateRepo = cookieTemplateRepo;
 }
Exemplo n.º 3
0
        private CacheSystem()
        {
            CacheEnabled = true;

            CookieRepository = null;

            CacheAreas = new Dictionary <CacheArea, ICacheArea>();
            //CacheAreas.Add(CacheArea.Request, new RequestCache(_httpContextAccessor));
            CacheAreas.Add(CacheArea.Request, new NoCache());
            //CacheAreas.Add(CacheArea.Session, new SessionCache());
            CacheAreas.Add(CacheArea.Session, new NoCache());
            CacheAreas.Add(CacheArea.Permanent, new NoCache());
            CacheAreas.Add(CacheArea.Global, new GlobalCache());
            CacheAreas.Add(CacheArea.Cookie, new CookieCache());
            CacheAreas.Add(CacheArea.Distributed, new NoCache());
            CacheAreas.Add(CacheArea.None, new NoCache());
            CacheAreas.Add(CacheArea.Other, new NoCache());
            CacheAreas.Add(CacheArea.Temp, new NoCache());
        }
Exemplo n.º 4
0
 public PicksController(ICookieRepository cookieRepository, IPickRepository pickRepository, IConfiguration config) : base(cookieRepository, config)
 {
     _pickRepository = pickRepository;
 }
Exemplo n.º 5
0
        //public static void SetLogDebugFunction(Action<string> logCall)
        //{
        //    CacheSystem.Instance.LogDebugMessage = logCall;
        //}
        //public static void SetLogErrorFunction(Action<string> logCall)
        //{
        //    CacheSystem.Instance.LogErrorMessage = logCall;
        //}


        //public static CacheSystem Instance
        //{

        //    get
        //    {

        //        //IMemoryCache _memoryCache = new MemoryCache(new MemoryCacheOptions());

        //        var ctx = _instance;
        //        if (ctx == null)
        //        {
        //            lock (CacheSystemCreateLock)
        //            {
        //                ctx = _instance;
        //                if (ctx == null)
        //                {
        //                    ctx = new CacheSystem();
        //                    _instance = ctx;
        //                    //_memoryCache.Set("CurrentCacheInstance", ctx);
        //                    //ctx = _memoryCache.Get<CacheSystem>("CurrentCacheInstance");
        //                }
        //            }
        //        }
        //        return ctx;
        //    }
        //}



        public void SetCookieRepository(ICookieRepository cookieRepository)
        {
            CookieRepository = cookieRepository;
        }
Exemplo n.º 6
0
        public CacheSystem(ILogger logger, ICookieRepository cookieRepository) : this()
        {
            CookieRepository = cookieRepository;

            _logger = logger;
        }
Exemplo n.º 7
0
 public AdminController(ICookieRepository cookieRepository, IAdminRepository adminRepository, IConfiguration config) : base(cookieRepository, config)
 {
     _adminRepository = adminRepository;
     _gameId          = this.GameId; //Convert.ToInt32(_config["GameId"].ToString());
 }
Exemplo n.º 8
0
 /// <summary>
 /// Default ctor for a new instance.
 /// </summary>
 /// <param name="baseContext">HttpBaseContext for accessing the HttpRequest.</param>
 /// <param name="cookieRepository">Implementation of ICookieRepository.</param>
 public CurrentLanguageStore(HttpContextBase baseContext, ICookieRepository cookieRepository)
 {
     _cookieRep = cookieRepository;
     _context = baseContext;
 }
Exemplo n.º 9
0
 public CurrentLanguageStore()
 {
     this._cookieRep = new HttpCookieRepository();
     this._context = new HttpContextWrapper(HttpContext.Current);
 }
Exemplo n.º 10
0
 public CurrentMarket(ICookieRepository cookieRepository, IMarketService marketService)
 {
     _cookieRepository = cookieRepository;
     _marketService    = marketService;
 }
Exemplo n.º 11
0
 public Handler(ICookieRepository repository)
 {
     _repository = repository ?? throw new ArgumentNullException(nameof(repository));
 }
Exemplo n.º 12
0
 public LoginController(ICookieRepository cookieRepository, IUserRepository userRepository, IConfiguration config) : base(cookieRepository, config)
 {
     _userRepository = userRepository;
 }
 /// <summary>
 /// Default ctor for a new instance.
 /// </summary>
 /// <param name="baseContext">HttpBaseContext for accessing the HttpRequest.</param>
 /// <param name="cookieRepository">Implementation of ICookieRepository.</param>
 public CurrentLanguageStore(HttpContextBase baseContext, ICookieRepository cookieRepository)
 {
     _cookieRep = cookieRepository;
     _context   = baseContext;
 }
 public CurrentLanguageStore()
 {
     this._cookieRep = new HttpCookieRepository();
     this._context   = new HttpContextWrapper(HttpContext.Current);
 }
Exemplo n.º 15
0
 public CurrentCurrency(ICookieRepository cookieRepository, ICurrentMarket currentMarket)
 {
     _cookieRepository = cookieRepository;
     _currentMarket    = currentMarket;
 }
Exemplo n.º 16
0
        //private readonly IConfiguration _config;

        public HomeController(ILogger <HomeController> logger, ICookieRepository cookieRepository, IConfiguration config) : base(cookieRepository, config)
        {
            _logger = logger;
            //_config = config;
        }