Esempio n. 1
0
        private ILifetimeScope CreateScope()
        {
            var scope = _scopeAccessor.CreateLifetimeScope();

            _scopeAccessor.LifetimeScope = scope;

            return(scope);
        }
Esempio n. 2
0
        private ILifetimeScope CreateScope()
        {
            var scope = _scopeAccessor.CreateLifetimeScope();

            _scopeAccessor.LifetimeScope = scope;
            scope.CurrentScopeEnding    += (s, e) => _scopeAccessor.LifetimeScope = null;

            return(scope);
        }