Say I have a class that implements multiple interfaces. I pass the same instance around using a different interface, depending on what the consumer is interested in.
I am trying to remember what this is called. I know there is a fancy name for it - I thought it was "interface partitioning", but I'm not finding any hits. The official name and perhaps a link to a site explaining what it is would be handy.
In case I haven't explained myself well enough, here is a real world example. I have a class, call it ContextManager
, that is responsible for providing access to configuration settings, session variables, user information and other utilities. Instead of passing the object around as a ContextManager
, I might pass it around as an IConfigurationManager
in one spot and as a IUserManager
in another. This prevents the client from accessing things they shouldn't care about and allows me to reuse code within the class.
I just want to know what it is called?