Esempio n. 1
0
        public override void Dispose()
        {
            lock (this)
            {
                if (_sslOverTdsStream != null)
                {
                    _sslOverTdsStream.Dispose();
                    _sslOverTdsStream = null;
                }

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

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

                //Release any references held by _stream.
                _stream = null;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Dispose object
        /// </summary>
        public override void Dispose()
        {
            if (_sslOverTdsStream != null)
            {
                _sslOverTdsStream.Dispose();
                _sslOverTdsStream = null;
            }

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

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

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

            //Release any references held by _stream.
            _stream = null;
        }
Esempio n. 3
0
        /// <summary>
        /// Dispose object
        /// </summary>
        public override void Dispose()
        {
            lock (this)
            {
                if (_sslOverTdsStream != null)
                {
                    _sslOverTdsStream.Dispose();
                    _sslOverTdsStream = null;
                }

                if (_sslStream != null)
                {
                    _sslStream.Dispose();
                    _sslStream = null;
                }
            }
        }
Esempio n. 4
0
        public sealed override void Dispose()
        {
            using (_debugLock.Acquire(this))
            {
                if (_sslOverTdsStream != null)
                {
                    _sslOverTdsStream.Dispose();
                    _sslOverTdsStream = null;
                }

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

                InternalDispose();
            }
        }