Ejemplo n.º 1
0
        public override void Dispose()
        {
            // If the connection was taken from a pool, return it to the pool.
            // Otherwise, dispose the underlying end-point and transition to "disposed" state.

            var poolReclamation = Interlocked.Exchange(ref _poolReclamation, null);

            if (poolReclamation != null)
            {
                poolReclamation.Return(this);
                return;
            }

            if (_disposed)
            {
                return;
            }

            _disposed = true;

            // dispose service and snapshot channels
            _serviceEndPoint.UnexpectedExceptionThrown -= UnexpectedExceptionThrown;
            _serviceEndPoint.Dispose();

#if DEBUG
            GC.SuppressFinalize(this);
#endif
        }
Ejemplo n.º 2
0
        protected override void DisposeImpl()
        {
            // dispose service and snapshot channels
            _serviceEndPoint.UnexpectedExceptionThrown -= UnexpectedExceptionThrown;
            _serviceEndPoint.Dispose();

            base.DisposeImpl();
        }
Ejemplo n.º 3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // dispose service and snapshot channels
                _serviceEndPoint.UnexpectedExceptionThrown -= UnexpectedExceptionThrown;
                _serviceEndPoint.Dispose();
                _remoteDataRpc.Dispose();
            }

            base.Dispose(disposing);
        }
Ejemplo n.º 4
0
 public void Dispose()
 {
     _endPoint.Disconnected -= OnDisconnected;
     _endPoint.UnexpectedExceptionThrown -= UnexpectedExceptionThrown;
     _endPoint.Dispose();
 }