Dependency Injection and Factories?

What I typically do is create a wrapper for my DI container... Something like IDependencyResolver... And inject it into my factories. Then, you can have an implementation like StructureMapDependencyResolver that does the lifting. I like this better than injecting the container itself because this keeps me free to change DI containers (almost) instantly.

At least my factories don't have to change.

It depends on what your DI framework allows and you didn't specify it. Using Autofac delegate-based registration, I came to the following solutions. Note that ILoaderFactory and IEntryFactory have been replaced by simple Func factories in both cases.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions