resolveHost function
Implementation
Host resolveHost(ServiceProvider serviceProvider) {
// resolve configuration explicitly once to mark it as resolved within the
// service provider, ensuring it will be properly disposed with the provider
serviceProvider.getService<Configuration>();
var host = serviceProvider.getRequiredService<Host>();
return host;
}