Open
Description
In some places where we need to pass parameters that aren't DI-able, we are using a pattern of DI-ing the fields to the "parent" and then passing them to the new child without using DI.
Ideally we use DI as much as possible and not pass stuff down. We may need to use factories to accomplish this.
E.g.
class MyClass(ISomethingProvider somethingProvider)
{
public ChildClass CreateChild(string myParam)
{
return new ChildClass(somethingProvider, myParam);
}
}
Also the yet to be merged remote directory picker contains an instance of this too.
Metadata
Metadata
Assignees
Labels
No labels