Wrapped factory for dependency injection