public void Dispose() { ClientAdapter.Dispose(); ServerAdapter.Dispose(); ((IDisposable)Graph).Dispose(); GeneralUtils.AbortThread(NegotiationThread); }
/// <summary> /// Stop the endpoint running /// </summary> public virtual void Stop() { if (_thread != null) { if (_thread.IsAlive) { GeneralUtils.AbortThread(_thread); _thread.Join(1000); } _thread = null; } }
/// <summary> /// Overidden dispose method /// </summary> /// <param name="disposing">True if should dispose of managed and unmanaged data</param> protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!_isDisposed) { _isDisposed = true; if (disposing) { _input.Stop(); } GeneralUtils.AbortThread(_thread); _thread = null; } }
/// <summary> /// Overidden dispose method /// </summary> /// <param name="disposing">True if should dispose of managed and unmanaged data</param> protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!_isDisposed) { _isDisposed = true; GeneralUtils.AbortThread(_thread); _thread = null; try { if (_input != null) { _input.Dispose(); } } catch { } } }