Exemplo n.º 1
0
        public void Dispose()
        {
            _logger.Debug("Disposing: " + typeof(ContainerCreator));

            if (_distributedEventAggregatorServiceHost != null)
            {
                _distributedEventAggregatorServiceHost.Close();
                _distributedEventAggregatorServiceHost = null;
            }

            if (_resolver != null)
            {
                _resolver.Dispose();
                _resolver = null;
            }

            _logger.Debug("Shutting down logger repository");
            if (_repository != null)
            {
                _repository.Shutdown();
                _repository = null;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 释放控制器实例。
        /// </summary>
        /// <param name="controller"></param>
        public override void ReleaseController(IController controller)
        {
            _scope?.Dispose();

            base.ReleaseController(controller);
        }
Exemplo n.º 3
0
 public static void Shutdown()
 {
     _instance.Dispose();
 }