protected virtual void Dispose(bool disposing) { if (!IsDisposed) { if (disposing) { Rsa?.Dispose(); DhPrime?.Dispose(); DhGenerator?.Dispose(); DhPublic?.Dispose(); DhPrivate?.Dispose(); } IsDisposed = true; } }
public void Dispose() { if (_disposed) { return; } _disposed = true; OnStopping(); UdpSocketManager.Dispose(); _listenerChannel.CloseAsync().WaitEx(); _listenerEventLoopGroup.ShutdownGracefullyAsync().WaitEx(); _workerEventLoopGroup.ShutdownGracefullyAsync().WaitEx(); Rsa.Dispose(); OnStopped(); }
public void Dispose() { if (Aes != null) { Aes.Dispose(); } if (Rsa != null) { Rsa.Dispose(); } if (Hasher != null) { Hasher.Dispose(); } if (Generator != null) { Generator.Dispose(); } }
public void Dispose() { if (_disposed) { return; } Configuration.Logger?.Information("Shutting down..."); _disposed = true; IsShuttingDown = true; OnStopping(); UdpSocketManager.Dispose(); ShutdownThreads(); Rsa.Dispose(); IsShuttingDown = false; IsRunning = false; OnStopped(); }
public override void Dispose() { Rsa.Dispose(); }