Exemplo n.º 1
0
        public SiteManager(
            SiteSettings currentSite,
            ISiteCommands siteCommands,
            ISiteQueries siteQueries,
            IUserCommands userCommands,
            IUserQueries userQueries,
            SiteDataProtector dataProtector,
            IHttpContextAccessor contextAccessor,
            ILogger <SiteManager> logger,
            IOptions <MultiTenantOptions> multiTenantOptionsAccessor,
            IOptions <SiteConfigOptions> setupOptionsAccessor,
            CacheHelper cacheHelper
            )
        {
            commands           = siteCommands;
            queries            = siteQueries;
            this.userCommands  = userCommands;
            this.userQueries   = userQueries;
            multiTenantOptions = multiTenantOptionsAccessor.Value;
            setupOptions       = setupOptionsAccessor.Value;
            _context           = contextAccessor?.HttpContext;
            this.dataProtector = dataProtector;
            log = logger;

            //resolver = siteResolver;
            siteSettings     = currentSite;
            this.cacheHelper = cacheHelper;
        }
Exemplo n.º 2
0
        public SiteManager(
            SiteContext currentSite,
            SiteEvents siteEventHandlers,
            ISiteCommands siteCommands,
            ISiteQueries siteQueries,
            IUserCommands userCommands,
            IUserQueries userQueries,
            SiteDataProtector dataProtector,
            IHttpContextAccessor contextAccessor,
            ILogger <SiteManager> logger,
            IOptions <MultiTenantOptions> multiTenantOptionsAccessor,
            IOptions <SiteConfigOptions> setupOptionsAccessor,
            CacheHelper cacheHelper
            )
        {
            _commands           = siteCommands;
            _queries            = siteQueries;
            _userCommands       = userCommands;
            _userQueries        = userQueries;
            _multiTenantOptions = multiTenantOptionsAccessor.Value;
            _setupOptions       = setupOptionsAccessor.Value;
            _context            = contextAccessor?.HttpContext;
            _dataProtector      = dataProtector;
            _log = logger;

            //resolver = siteResolver;
            _currentSite   = currentSite;
            _cacheHelper   = cacheHelper;
            _eventHandlers = siteEventHandlers;
        }
Exemplo n.º 3
0
        public SiteManager(
            SiteContext currentSite,
            ISiteCommands siteCommands,
            ISiteQueries siteQueries,
            IUserCommands userCommands,
            IUserQueries userQueries,
            SiteDataProtector dataProtector,
            IHttpContextAccessor contextAccessor,
            ILogger<SiteManager> logger,
            IOptions<MultiTenantOptions> multiTenantOptionsAccessor,
            IOptions<SiteConfigOptions> setupOptionsAccessor,
            CacheHelper cacheHelper
            )
        {

            commands = siteCommands;
            queries = siteQueries;
            this.userCommands = userCommands;
            this.userQueries = userQueries;
            multiTenantOptions = multiTenantOptionsAccessor.Value;
            setupOptions = setupOptionsAccessor.Value;
            _context = contextAccessor?.HttpContext;
            this.dataProtector = dataProtector;
            log = logger;

            //resolver = siteResolver;
            siteSettings = currentSite;
            this.cacheHelper = cacheHelper;
        }
Exemplo n.º 4
0
 public SiteResolver(
     ISiteQueries siteRepository,
     SiteDataProtector dataProtector,
     IOptions <MultiTenantOptions> multiTenantOptions)
 {
     siteRepo = siteRepository;
     this.multiTenantOptions = multiTenantOptions.Value;
     this.dataProtector      = dataProtector;
 }
Exemplo n.º 5
0
 public SiteContextResolver(
     ISiteQueries siteRepository,
     SiteDataProtector dataProtector,
     IOptions <MultiTenantOptions> multiTenantOptions
     )
 {
     SiteQueries        = siteRepository;
     MultiTenantOptions = multiTenantOptions.Value;
     DataProtector      = dataProtector;
 }
Exemplo n.º 6
0
 public RequestSiteResolver(
     ISiteRepository siteRepository,
     SiteDataProtector dataProtector,
     IOptions <MultiTenantOptions> multiTenantOptions,
     IHttpContextAccessor httpContextAccessor)
 {
     contextAccessor         = httpContextAccessor;
     siteRepo                = siteRepository;
     this.multiTenantOptions = multiTenantOptions.Value;
     this.dataProtector      = dataProtector;
 }
Exemplo n.º 7
0
 public RequestSiteResolver(
     ISiteRepository siteRepository,
     SiteDataProtector dataProtector,
     IOptions<MultiTenantOptions> multiTenantOptions,
     IHttpContextAccessor httpContextAccessor)
 {
     contextAccessor = httpContextAccessor;
     siteRepo = siteRepository;
     this.multiTenantOptions = multiTenantOptions.Value;
     this.dataProtector = dataProtector;
 }
 public CachingSiteContextResolver(
     IMemoryCache cache,
     ISiteQueries siteRepository,
     SiteDataProtector dataProtector,
     IOptions <MultiTenantOptions> multiTenantOptions,
     ILogger <CachingSiteContextResolver> logger,
     IOptions <CachingSiteResolverOptions> cachingOptionsAccessor
     ) : base(siteRepository, dataProtector, multiTenantOptions)
 {
     _cache          = cache;
     _cachingOptions = cachingOptionsAccessor.Value;
     _log            = logger;
 }
 public CachingSiteResolver(
     IMemoryCache cache,
     ILoggerFactory loggerFactory,
     ISiteQueries siteRepository,
     SiteDataProtector dataProtector,
     IOptions <MultiTenantOptions> multiTenantOptions,
     IOptions <CachingSiteResolverOptions> cachingOptionsAccessor
     )
     : base(cache, loggerFactory)
 {
     siteRepo = siteRepository;
     this.multiTenantOptions = multiTenantOptions.Value;
     this.dataProtector      = dataProtector;
     cachingOptions          = cachingOptionsAccessor.Value;
 }
Exemplo n.º 10
0
        //private readonly IEnumerable<SiteSettings> tenants;

        public CachingSiteResolver(
            IMemoryCache cache,
            ILoggerFactory loggerFactory,
            ISiteRepository siteRepository,
            SiteDataProtector dataProtector,
            IOptions <MultiTenantOptions> multiTenantOptions,
            IOptions <CachingSiteResolverOptions> cachingOptionsAccessor = null
            //,IOptions<MultiTenancyOptions> options
            )
            : base(cache, loggerFactory)
        {
            //this.tenants = options.Value.Tenants;
            siteRepo = siteRepository;
            this.multiTenantOptions = multiTenantOptions.Value;
            this.dataProtector      = dataProtector;
            cachingOptions          = cachingOptionsAccessor?.Value ?? new CachingSiteResolverOptions();
        }
Exemplo n.º 11
0
        public SiteManager(
            ISiteRepository siteRepository,
            IUserRepository userRepository,
            SiteDataProtector dataProtector,
            IHttpContextAccessor contextAccessor,
            ISiteResolver siteResolver,
            ILogger <SiteManager> logger,
            IOptions <MultiTenantOptions> multiTenantOptionsAccessor,
            IOptions <SiteConfigOptions> setupOptionsAccessor
            )
        {
            siteRepo           = siteRepository;
            userRepo           = userRepository;
            multiTenantOptions = multiTenantOptionsAccessor.Value;
            setupOptions       = setupOptionsAccessor.Value;
            _context           = contextAccessor?.HttpContext;
            this.dataProtector = dataProtector;
            log = logger;

            resolver = siteResolver;
        }
Exemplo n.º 12
0
        public SiteManager(
            ISiteRepository siteRepository,
            IUserRepository userRepository,
            SiteDataProtector dataProtector,
            IHttpContextAccessor contextAccessor,
            ISiteResolver siteResolver,
            ILogger<SiteManager> logger,
            IOptions<MultiTenantOptions> multiTenantOptionsAccessor,
            IOptions<SiteConfigOptions> setupOptionsAccessor
            )
        {
            
            siteRepo = siteRepository;
            userRepo = userRepository;
            multiTenantOptions = multiTenantOptionsAccessor.Value;
            setupOptions = setupOptionsAccessor.Value;
            _context = contextAccessor?.HttpContext;
            this.dataProtector = dataProtector;
            log = logger;

            resolver = siteResolver;
        }