public void Dispose() { Stop(); _completionQueues?.Dispose(); _requestProcessingEngine?.Dispose(); _sessionManager?.Dispose(); }
protected virtual void Dispose(bool disposing) { if (_sessionManager != null) { _sessionManager.Dispose(); _sessionManager = null; } }
private void Dispose(bool disposing) { ReleaseUnmanagedResources(); if (disposing) { Stop(); _completionQueues?.Dispose(); _requestProcessingEngine?.Dispose(); _sessionManager?.Dispose(); } }
/// <summary> /// Verwaltete Ressourcen freigeben. /// </summary> public void Dispose() { // Wenn Dispose noch nicht aufgerufen wurde ... if (!_isDisposed) { // Schalter setzen _isDisposed = true; // Host aus der Auflistung entfernen _hosts.Remove(this); // Horchen auf Client-Anfragen beenden StopListening(); // Wenn der Komponentenaufrufer existiert ... if (_invoker != null) { // Komponnetenaufrufer entsorgen _invoker = null; } // Wenn die Sitzungsverwaltung existiert ... if (_sessionManager != null) { // Sitzungsverwaltung entsorgen _sessionManager.Dispose(); _sessionManager = null; } // Wenn die Authentifizierung verdrahtet ist ... if (this.Authenticate != null) { // Verdrahtung aufheben this.Authenticate = null; } // Wenn der Authentifizierungsanbieter existiert ... if (_authProvider != null) { // Authentifizierungsanbieter entsorgen _authProvider = null; } // Wenn der Komponentenkatalog existiert ... if (_catalog != null) { // Komponentenkatalog entsorgen _catalog = null; } } }
/// <summary> /// Releases all managed resources. /// </summary> /// <param name="calledFromFinalizer">Specifies if this method is called from finalizer or not</param> private void Dispose(bool calledFromFinalizer) { if (!_isDisposed) { OnDisposing(new EventArgs()); _isDisposed = true; _hosts.Remove(this); StopListening(); if (_dispatcher != null) { _dispatcher = null; } if (_sessionManager != null) { _sessionManager.Dispose(); _sessionManager = null; } if (this.Authenticate != null) { this.Authenticate = null; } if (_authProvider != null) { _authProvider = null; } if (_catalog != null) { if (_catalog.DisposeWithHost) { _catalog.Dispose(); } _catalog = null; } if (!calledFromFinalizer) { GC.SuppressFinalize(this); } } }
/// <summary> /// Releases all managed resources. /// </summary> /// <param name="calledFromFinalizer">Specifies if this method is called from finalizer or not</param> private void Dispose(bool calledFromFinalizer) { if (!_isDisposed) { OnDisposing(new EventArgs()); _isDisposed = true; _hosts.Remove(this); DisableDiscovery(); StopListening(); if (_sessionManager != null) { _sessionManager.Dispose(); _sessionManager = null; } _dispatcher = null; Authenticate = null; _authProvider = null; if (_catalog != null && DisposeCatalogWithHost) { var catalog = _catalog as IDisposable; if (catalog != null) { catalog.Dispose(); } _catalog = null; } if (!calledFromFinalizer) { GC.SuppressFinalize(this); } } }
private void Dispose(bool disposing) { if (disposing) { _session.Close(); _receiveCompletionProcessor.Stop(); _sendRequestProcessingEngine.Stop(); _completionQueues?.Dispose(); _sessionManager?.Dispose(); _sendRequestProcessingEngine?.Dispose(); _handshakeSignal?.Dispose(); } else { if (_socket != IntPtr.Zero) { WinSock.closesocket(_socket); } } }
public void Dispose() { sessionManager?.Dispose(); }