Do not use the service locator pattern wherever possible (if the service type is known in the development time). Because it makes the dependencies implicit. That means it’s not possible to see the dependencies easily while creating an instance of the servi…