public async Task StopAsync(CancellationToken cancellationToken = new CancellationToken()) { _diagnostics.RegisterLapTime("Host stopping"); await _host.StopAsync(cancellationToken); _diagnostics.RegisterLapTime("Host stopped"); AddTimetableSection(); var builder = new StringBuilder(); builder.AppendLine(); builder.AppendLine("SHUTDOWN DIAGNOSTICS"); builder.AppendLine(); AppendDiagnosticsSections(builder, new [] { _diagnostics.Get(TimetableSectionKey) }); _logger.LogDebug($"{builder}"); }