It doesn't seem we can win on the way we get AutofacDependencyResolver.Current - whether it's registered in a lifetime scope or unwound from the currently set resolver.
By default, the current behavior is great, but for folks who still need to do some sort of unsupported decoration, we should offer a way to override the default behavior. A sort of factory method/function that is used to retrieve the resolver could help.
public void SetCurrentResolverAccessor(Func<AutofacDependencyResolver> accessor)
Set it to null to return to the default behavior; otherwise set it to something specific to take control of how to get the current Autofac dependency resolver.
It doesn't seem we can win on the way we get
AutofacDependencyResolver.Current
- whether it's registered in a lifetime scope or unwound from the currently set resolver.By default, the current behavior is great, but for folks who still need to do some sort of unsupported decoration, we should offer a way to override the default behavior. A sort of factory method/function that is used to retrieve the resolver could help.
Set it to null to return to the default behavior; otherwise set it to something specific to take control of how to get the current Autofac dependency resolver.