You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both projects are MIT license, so there's no problem. It appears SimpleInjector is using the same mechanism as the ASP.NET Core HttpContextAccessor anyway, so that's not a new pattern.
The current implementation of injecting
HttpRequestMessage
relies on updating the component registryhttps://github.com/autofac/Autofac.WebApi/blob/develop/src/Autofac.Integration.WebApi/CurrentRequestHandler.cs#L66
However this defeats the best practices in the documentation: the container should be considered immutable.
Also
ContainerBuilder.Update
is marked as obsolete in this commit autofac/Autofac@8a89e94Should another approach be considered? Like the one Simple Injector is using, by capturing the
HttpRequestMessage
in a provider:https://github.com/simpleinjector/SimpleInjector/blob/master/src/SimpleInjector.Integration.WebApi/SimpleInjectorWebApiExtensions.cs
I will be happy to help with a pull request if needed.
The text was updated successfully, but these errors were encountered: