Autofac passing parameter to nested types
问题 I am using Autofac as my IoC in my WCF service. I have a situation where I want to pass an object to a nested type (ie a type that is not resolved directly, but when resolving another type). As far as I understood, passing this object as a constructor parameter is the preferred way in Autofac. Here is an example of such a situation. The nested type: public class EventLogger<T> : IEventLogger<T> { public EventLogger(IRepository<T> repository, User currentUser) { ... } } The type I am actually