Example #1
0
        void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                if (_channel != null)
                {
                    _channel.Dispose();
                    _channel = null;
                }

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

                Logger.Shutdown();
            }

            _disposed = true;
        }
Example #2
0
        void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                if (_hostChannel != null)
                {
                    _hostChannel.Dispose();
                    _hostChannel = null;
                }

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

                _domain = null;
            }

            _disposed = true;
        }
Example #3
0
        void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                if (_hostChannel != null)
                {
                    _hostChannel.Dispose();
                    _hostChannel = null;
                }

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

                try
                {
                    _log.DebugFormat("[{0}] Unloading AppDomain", _serviceName);

                    _log.InfoFormat("[{0}] AppDomain Unloaded", _serviceName);
                }
                catch (Exception)
                {
                    _log.DebugFormat("[{0}] AppDomain was already unloaded", _serviceName);
                }
                finally
                {
                    _domain = null;
                }
            }

            _disposed = true;
        }