-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
While adding a new feature to YARP, I had a need to add my new type to DI but my type also required access to a server feature. This didn't work as it seems server features are not added to DI.
I was able to work around this by adding the feature myself via the IServer object:
builder.Services.AddSingleton(p => p.GetRequiredService<IServer>().Features.Get<IServerDelegationFeature>());Describe the solution you'd like
I think it would be nicer if the server features were added to DI directly when created.
Additional context
No response
Metadata
Metadata
Assignees
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions