IoC containers like Ninject expose the “activation context” in factory methods that allows the creator to understand the context in which the instance is being created. My specific pratical need is the following:
container.AddTransient<ILog>(context => LogManager.GetLogger(context.GetScope()));
This way I could inject an instance of ILog that has the type parameter as the type in which he is getting injected into.
Is it possible to have this kind of information inside factory methods?