-
Notifications
You must be signed in to change notification settings - Fork 522
Expose WebHostBuilderContext in UseKestrel #2177
Conversation
/// </returns> | ||
public static IWebHostBuilder UseKestrel(this IWebHostBuilder hostBuilder, Action<WebHostBuilderContext, KestrelServerOptions> configureOptions) | ||
{ | ||
if (configureOptions == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this null check be added to the extension above as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
services.Configure does that check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the sample app builds
samples/SampleApp/Startup.cs
Outdated
{ | ||
.UseKestrel((context, options) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right
fa02ae8
to
b5f43e9
Compare
b5f43e9
to
8b19fc9
Compare
I wonder if this would be better to put on the KestrelServerOptions object itself. |
shrug It may mess up |
8b19fc9
to
a75b71a
Compare
Is the WebHostBuilderContext in the container? |
No |
Then this is fine |
#1334 @halter73 I've poached this because it will make the configuration work easier.