I have an interface whose job is to communicate with repository (that implements some interface). It doesn't seem to make sense to implement this interface without receiving a repository,so I'd like to inject it.
I then ask:where should I receive the repository? Since it is required in almost every method call it seems reasonable to inject the dependency in the constructor, and not in (practically) every method in the interface as this leads to a volition of the DRY (don't repeat yourself) principle.
On the other hand, there is no way of enforcing that every implementor would have this dependency in its constructor (moreover - how should an implementor even know this?)
I also thought about having an abstract class instead of an interface, but I soon ruled out that option as to not limit the option to derive another class.
What should I do in this situation, where should I receive the dependency?