public async Task Stop() { // TODO: Stop other things that need it // TODO: Stop the API await Task.WhenAll(TransportInterfaces.AllWithService <Stoppable>().Select(x => x.Service.Stop())) .ConfigureAwait(false); await Task.WhenAll(Channels.AllWithService <Stoppable>().Select(x => x.Service.Stop())) .ConfigureAwait(false); await Task.WhenAll(Stores.AllWithService <Stoppable>().Select(x => x.Service.Stop())) .ConfigureAwait(false); }