protected async Task StopAsync() { if (_jsonRpcRunner != null) { await _jsonRpcRunner.StopAsync(); } if (_ethereumRunner != null) { await _ethereumRunner.StopAsync(); } }
protected async Task StopAsync() { var jsonTask = _jsonRpcRunner?.StopAsync() ?? Task.CompletedTask; var ethereumTask = _ethereumRunner?.StopAsync() ?? Task.CompletedTask; await Task.WhenAll(jsonTask, ethereumTask); }