/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Mvc/test/WebSites/RoutingWebSite/Program.cs
28 строк
776 B
Copilot
Replace WebHostBuilder with HostBuilder pattern in MVC folder (#62703)
17 июл 2025, 21:17
Не верифицирован
17 июл 2025, 21:17
c80f3e5
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Extensions.Hosting; namespace RoutingWebSite; public class Program { public static void Main(string[] args) { using var host = CreateHostBuilder(args) .Build(); host.Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => new HostBuilder() .ConfigureWebHost(webHostBuilder => { webHostBuilder .UseContentRoot(Directory.GetCurrentDirectory()) .UseStartup<StartupForFallback>() .UseKestrel() .UseIISIntegration(); }); }