Closed xp-development closed 6 years ago
Hi @jan-schubert
You want to do something like this
container.Configure(c => c.ExportFactory<StaticInjectionContext, ILog>(
context => logProvider.GetLogger(context?.TargetInfo.InjectionType)));
Thank you. Now I found a unit test for my case (FactorySpecialTypeTests.Factory_Depend_On_IExportLocatorScope_StaticContext).
Hi. Because of the great performance, we try to migrate our project from Ninject to Grace. Now I try to configure our own ILog interface by using DI.
Ninject configuration:
container.Bind<ILog>().ToMethod(context => logProvider.GetLogger(context?.Request.Target?.Member.DeclaringType)).InTransientScope();
Is it possible to get the type of the object that request ILog?
Sample: