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 }
protected override void DisposeImpl() { // dispose service and snapshot channels _serviceEndPoint.UnexpectedExceptionThrown -= UnexpectedExceptionThrown; _serviceEndPoint.Dispose(); base.DisposeImpl(); }
protected override void Dispose(bool disposing) { if (disposing) { // dispose service and snapshot channels _serviceEndPoint.UnexpectedExceptionThrown -= UnexpectedExceptionThrown; _serviceEndPoint.Dispose(); _remoteDataRpc.Dispose(); } base.Dispose(disposing); }
public void Dispose() { _endPoint.Disconnected -= OnDisconnected; _endPoint.UnexpectedExceptionThrown -= UnexpectedExceptionThrown; _endPoint.Dispose(); }