Пример #1
0
 protected internal override void OnStop()
 {
     if (rpc != null)
     {
         rpc.Dispose();
     }
     LocalNode.Dispose();
     Blockchain.Default.Dispose();
 }
Пример #2
0
 /// <inheritdoc/>
 public void Dispose()
 {
     StopClient();
     StopServer();
     StopNotifier();
     StopRpcServer();
     m_dispatcher.Dispose();
     m_storage.Dispose();
     m_rpcServer.Dispose();
     m_notifier.Dispose();
 }
Пример #3
0
        public void OneTimeTearDown()
        {
            m_clientDispatcher.Dispose();
            m_clientStorage.Dispose();
            m_clientNotifier.Dispose();
            m_clientRpc.Dispose();

            m_serverDispatcher.Dispose();
            m_serverStorage.Dispose();
            m_serverNotifier.Dispose();
            m_serverRpc.Dispose();
        }
Пример #4
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _rpc.Dispose();

                if (components != null)
                {
                    components.Dispose();
                }
            }

            base.Dispose(disposing);
        }
Пример #5
0
 protected internal override void OnStop()
 {
     if (consensus != null)
     {
         consensus.Dispose();
     }
     if (rpc != null)
     {
         rpc.Dispose();
     }
     LocalNode.Dispose();
     using (FileStream fs = new FileStream(PeerStatePath, FileMode.Create, FileAccess.Write, FileShare.None))
     {
         LocalNode.SaveState(fs);
     }
     Blockchain.Default.Dispose();
 }
Пример #6
0
        public void Dispose()
        {
            // 停止RpcServer
            rpcserver?.Dispose();

            // 停止所有插件
            pluginmgr.Dispose();

            // 停止所有的应用链
            StopAllAppChains();

            // 停止根链
            StopRootSystem();

            // 关闭ActorSystem
            ActorSystem.Dispose();
        }
Пример #7
0
 public void Dispose()
 {
     rpcServer?.Dispose();
     ActorSystem.Stop(LocalNode);
     ActorSystem.Dispose();
 }
Пример #8
0
 public void TestDispose()
 {
     server.Dispose();
 }