Commit Graph

6 Commits

Author SHA1 Message Date
David Fowler cfe9b26a34
Added support for generic host based IWebHostBuilder (#1580)
- This adds an implementation of IWebHostBuilder as a facade over the IHostBuilder.
This removes the 2 container issue by executing the Startup.ConfigureServies and Startup.ConfigureContainer inline as part of building the IHostBuilder.
- The implementation is highly compatible implementation since it exposes the same IWebHostBuilder interface.
Existing extensions mostly work.
- There are some caveats with this approach.
    - Injecting services into Startup is not extremely constrained to the
    services availble on HostBuilderContext. This includes the IHostingEnvironment
    and the IConfiguration.
    - IStartup is broken when using this pattern because it isn't composable.
    - The IStartupConfigureServicesFilter and IStartupConfigureContainer The before
    and after filters added in 2.1 are also broken  because there's a single container (it could maybe be fixed by downcasting and doing something specific on the GenericHostBuilder instance).
    - Calling into IWebHostBuilder.Build will throw a NotSupportedException since
    this implementation is just a facade over the IHostBuilder.
2018-11-13 21:22:30 -08:00
Ryan Brandenburg 38f691c09e Upgrade to netcoreapp22 (#1410) 2018-05-08 11:02:12 -07:00
Chris Ross (ASP.NET) 2c1376c95f Add a AddHostedService extension #1402 2018-05-01 14:07:24 -07:00
Pranav K adf2f37ad2 Update samples and tests to target netcoreapp2.1 2017-11-13 17:10:46 -08:00
Nate McMaster c5f2333481 Pin tool and package versions to make build more repeatable 2017-10-31 13:04:32 -07:00
Chris Ross (ASP.NET) ae9da9290e #1163 Implement the generic host 2017-09-14 14:48:06 -07:00