For example I have dependency:
public interface IMyDependency
{
}
public class MyDependency : IMyDependency
{
}
That injects in MyClass ob
For dependencies that are independent of the instance you're creating, inject them into the factory and store them until needed.
For dependencies that are independent of the context of creation but need to be recreated for each created instance, inject factories into the factory and store them.
For dependencies that are dependent on the context of creation, pass them into the Create
method of the factory.