/// <summary> /// Initializes and starts a new <see cref="IWebHost"/> with pre-configured defaults. /// See <see cref="CreateDefaultBuilder()"/> for details. /// </summary> /// <param name="url">The URL the hosted application will listen on.</param> /// <param name="app">A delegate that handles requests to the application.</param> /// <returns>A started <see cref="IWebHost"/> that hosts the application.</returns> public static IWebHost Start(string url, RequestDelegate app) { var startupAssemblyName = app.GetMethodInfo().DeclaringType.GetTypeInfo().Assembly.GetName().Name; return(StartWith(url: url, configureServices: null, app: appBuilder => appBuilder.Run(app), applicationName: startupAssemblyName)); }