public async Task RestartServerAsync(Context context) { if (_doNotStartService) { throw new InvalidOperationException(); } await _serviceProcess.ShutdownAsync(context).ShouldBeSuccess(); _serviceProcess.Dispose(); _serviceProcess = new ServiceProcess(_configuration, _localContentServerConfiguration, Configuration.Scenario, WaitForServerReadyTimeoutMs, WaitForExitTimeoutMs); await _serviceProcess.StartupAsync(context).ShouldBeSuccess(); }
protected override void DisposeCore() { _serviceProcess?.Dispose(); base.DisposeCore(); }