コード例 #1
0
 public void Run()
 {
     blockMiner.Start();
     rpcServer.Start();
     Console.ReadKey();
     blockMiner.Stop();
     rpcServer.Stop();
 }
コード例 #2
0
ファイル: RpcService.cs プロジェクト: ewin66/Safety-JM-Server
 /// <summary>
 /// 停止RPC服务器
 /// </summary>
 /// <returns></returns>
 public static bool StopRpcServer()
 {
     if (_server != null)
     {
         _server.Stop();
     }
     LogHelper.Info("停止数据处理模块【停止RPC服务处理完成】!");
     return(true);
 }
コード例 #3
0
        public void Stop_Rpc_Server_After_Running_Tests()
        {
            var dotNetTestRunner      = new DotNetTestRunner(_rpcServerMock, _process);
            var testProjectOutputPath = "bin/debug";
            var coverageContext       = new CoverageContext();

            dotNetTestRunner.Run(coverageContext, testProjectOutputPath);

            Received.InOrder(() =>
            {
                _process.Execute(Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>());
                _rpcServerMock.Stop();
            });
        }
コード例 #4
0
        public void Run(CoverageContext coverageContext, string testProjectOutputPath)
        {
            var testProjectPath = GetTestProjectPath(testProjectOutputPath);

            _rpcServer.Start(coverageContext);

            /*
             * It is important that the --no-build flag is used, otherwise dotnet-test will run a new build of the project
             * which will overwrite the assembly files that were instrumented.
             */
            _process.Execute("dotnet", "test --no-build", testProjectPath);

            _rpcServer.Stop();
        }
コード例 #5
0
 /// <summary>
 /// 停止RPC服务器
 /// </summary>
 /// <returns></returns>
 public bool StopRpcServer()
 {
     _server.Stop();
     LogHelper.Debug("停止RPC服务器成功");
     return(true);
 }
コード例 #6
0
 public void Dispose()
 {
     _slaveServer.Stop().Wait();
 }
コード例 #7
0
 public void Dispose()
 {
     _agentServer.Stop().Wait();
 }
コード例 #8
0
 public void RpcStopCommand() => _rpc?.Stop();