コード例 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!IsDisposed)
     {
         if (disposing)
         {
             Rsa?.Dispose();
             DhPrime?.Dispose();
             DhGenerator?.Dispose();
             DhPublic?.Dispose();
             DhPrivate?.Dispose();
         }
         IsDisposed = true;
     }
 }
コード例 #2
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;

            OnStopping();
            UdpSocketManager.Dispose();
            _listenerChannel.CloseAsync().WaitEx();
            _listenerEventLoopGroup.ShutdownGracefullyAsync().WaitEx();
            _workerEventLoopGroup.ShutdownGracefullyAsync().WaitEx();
            Rsa.Dispose();
            OnStopped();
        }
コード例 #3
0
 public void Dispose()
 {
     if (Aes != null)
     {
         Aes.Dispose();
     }
     if (Rsa != null)
     {
         Rsa.Dispose();
     }
     if (Hasher != null)
     {
         Hasher.Dispose();
     }
     if (Generator != null)
     {
         Generator.Dispose();
     }
 }
コード例 #4
0
        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();
        }
コード例 #5
0
 public override void Dispose()
 {
     Rsa.Dispose();
 }