Esempio n. 1
0
        public ScopeProvider(
            IAmbientScopeStack ambientScopeStack,
            IAmbientScopeContextStack ambientContextStack,
            IDistributedLockingMechanismFactory distributedLockingMechanismFactory,
            IUmbracoDatabaseFactory databaseFactory,
            FileSystems fileSystems,
            IOptionsMonitor <CoreDebugSettings> coreDebugSettings,
            MediaFileManager mediaFileManager,
            ILoggerFactory loggerFactory,
            IEventAggregator eventAggregator)
        {
            DistributedLockingMechanismFactory = distributedLockingMechanismFactory;
            DatabaseFactory      = databaseFactory;
            _ambientScopeStack   = ambientScopeStack;
            _ambientContextStack = ambientContextStack;
            _fileSystems         = fileSystems;
            _coreDebugSettings   = coreDebugSettings.CurrentValue;
            _mediaFileManager    = mediaFileManager;
            _logger          = loggerFactory.CreateLogger <ScopeProvider>();
            _loggerFactory   = loggerFactory;
            _eventAggregator = eventAggregator;
            // take control of the FileSystems
            _fileSystems.IsScoped = () => AmbientScope != null && AmbientScope.ScopedFileSystems;

            coreDebugSettings.OnChange(x => _coreDebugSettings = x);
        }
Esempio n. 2
0
 public ScopeProvider(
     IDistributedLockingMechanismFactory distributedLockingMechanismFactory,
     IUmbracoDatabaseFactory databaseFactory,
     FileSystems fileSystems,
     IOptionsMonitor <CoreDebugSettings> coreDebugSettings,
     MediaFileManager mediaFileManager,
     ILoggerFactory loggerFactory,
     IRequestCache requestCache,
     IEventAggregator eventAggregator)
     : this(
         StaticServiceProvider.Instance.GetRequiredService <IAmbientScopeStack>(),
         StaticServiceProvider.Instance.GetRequiredService <IAmbientScopeContextStack>(),
         distributedLockingMechanismFactory,
         databaseFactory,
         fileSystems,
         coreDebugSettings,
         mediaFileManager,
         loggerFactory,
         eventAggregator)
 {
 }
Esempio n. 3
0
        public ScopeProvider(
            IDistributedLockingMechanismFactory distributedLockingMechanismFactory,
            IUmbracoDatabaseFactory databaseFactory,
            FileSystems fileSystems,
            IOptionsMonitor <CoreDebugSettings> coreDebugSettings,
            ILoggerFactory loggerFactory,
            IRequestCache requestCache,
            IEventAggregator eventAggregator)
        {
            DistributedLockingMechanismFactory = distributedLockingMechanismFactory;
            DatabaseFactory    = databaseFactory;
            _fileSystems       = fileSystems;
            _coreDebugSettings = coreDebugSettings.CurrentValue;
            _logger            = loggerFactory.CreateLogger <ScopeProvider>();
            _loggerFactory     = loggerFactory;
            _requestCache      = requestCache;
            _eventAggregator   = eventAggregator;
            // take control of the FileSystems
            _fileSystems.IsScoped = () => AmbientScope != null && AmbientScope.ScopedFileSystems;

            coreDebugSettings.OnChange(x => _coreDebugSettings = x);
        }