public CallingClass(IChildClass childClass) { _childClass = childClass ?? throw new ArgumentNullException(nameof(childClass)); }
public MyRootClass(IChildClass childClass) { _childClass = childClass; }
public ParentClass(IChildFactory childFactory, IDependency dependency) { _child = childFactory.Create(dependency); }