예제 #1
0
        public void Dispose()
        {
            if (_wasDisposed)
            {
                return;
            }
            _wasDisposed = true;

            if (Role == ContainerRole.Root)
            {
                _singletons.DisposeAndClear();
            }

            ContainerCache.DisposeAndClear();


            _transients.DisposeAndClear();
            _pluginGraph.SafeDispose();

            if (Role == ContainerRole.Root)
            {
                _profiles.AllProfiles().Each(x => x.Dispose());
            }

            _trackedDisposables.Each(x => x.Dispose());
        }
예제 #2
0
        public void Dispose()
        {
            if (Role == ContainerRole.Root)
            {
                _singletons.DisposeAndClear();
            }

            _transients.DisposeAndClear();
            _pluginGraph.SafeDispose();
        }
예제 #3
0
        public void Dispose()
        {
            //might need some locking in here, since _factories is being modified
            if (_factories.ContainsKey(typeof(IContainer)))
            {
                _factories[typeof(IContainer)].AllInstances.Each(x => x.SafeDispose());
            }

            foreach (var factory in _factories)
            {
                factory.Value.Dispose();
            }

            _factories.Clear();
            _profileManager.Dispose();
            _genericsGraph.ClearAll();

            _transientCache.DisposeAndClear();
        }
예제 #4
0
 public void Dispose()
 {
     _transients.DisposeAndClear();
     _pluginGraph.SafeDispose();
 }
예제 #5
0
 public TimeExpiringLifeCycle(long timeInSeconds)
 {
     _secondsToExpire = timeInSeconds;
     _cache.DisposeAndClear();
 }
예제 #6
0
 public void EjectAll()
 {
     _objectCache.DisposeAndClear();
 }
 public override void EjectAll(ILifecycleContext context)
 {
     _cache.DisposeAndClear();
 }
예제 #8
0
 public void Dispose()
 {
     _transientCache.DisposeAndClear();
     _outer.SafeDispose();
 }