Skip to content

Conversation

@davidfowl
Copy link
Member

@davidfowl davidfowl commented Jul 21, 2020

  • Adds an overload of UseStartup that takes a factory so users can control the instance creation. The factory is given the WebHostBuilderContext to expose access to configuration and IWebHostEnvironment.
  • Make sure only one startup delegate runs, the last one registered.

Fixes #19809

@ghost ghost added the area-hosting label Jul 21, 2020
@davidfowl davidfowl requested a review from Tratcher July 21, 2020 07:56
@davidfowl davidfowl added the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label Jul 21, 2020
@ghost
Copy link

ghost commented Jul 21, 2020

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

Copy link
Member

@Tratcher Tratcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Why is it still draft?

@davidfowl
Copy link
Member Author

Looks good. Why is it still draft?

I need to add a test and do API review.

Base automatically changed from davidfowl/fix-hosting-slnf to master July 21, 2020 18:22
@halter73
Copy link
Member

So this adds new public UseStartup method overloads that take a factory to HostingStartupWebHostBuilder and WebHostBuilderExtensions? Anything else? Do we have a good way to create an API diff yet?

@davidfowl
Copy link
Member Author

So this adds new public UseStartup method overloads that take a factory to HostingStartupWebHostBuilder and WebHostBuilderExtensions? Anything else? Do we have a good way to create an API diff yet?

That's the only new API.

- Adds an overload of UseStartup that takes a factory so users can control the instance creation. The factory is given the WebHostBuilderContext to expose access to configuration and IWebHostEnvironment.
- Make sure only one startup delegate runs, the last one registered.
@davidfowl davidfowl force-pushed the davidfowl/own-startup branch from 8994e80 to 76846b0 Compare July 22, 2020 00:16
@davidfowl davidfowl marked this pull request as ready for review July 22, 2020 00:23
@davidfowl davidfowl added this to the 5.0.0 milestone Jul 22, 2020
Copy link
Contributor

@pranavkm pranavkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API looks fine by me. Feel free to send an email for broader visibility.

- Use actual throw expressions...
- Added null checks
@pranavkm pranavkm added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews labels Jul 22, 2020
@davidfowl davidfowl changed the base branch from master to release/5.0-preview8 July 22, 2020 06:04
@davidfowl davidfowl requested a review from a team July 22, 2020 06:04
@davidfowl davidfowl changed the base branch from release/5.0-preview8 to master July 22, 2020 06:04
@davidfowl davidfowl modified the milestones: 5.0.0, 5.0.0-rc1 Jul 22, 2020
@davidfowl davidfowl merged commit 113805a into master Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-approved API was approved in API review, it can be implemented area-hosting Includes Hosting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Startup class activation allow additional params

6 participants