Is there a simple way (using code contracts perhaps?) to prevent the use of certainl dlls/namespace/assemblies within a given portion of an application?
My use case is that I'd like a warning mechanism when I try to use a company wide service layer within my controllers.
Instead we should have a layer beween that service layer and our controllers (the service layer is changing and we'll be switching it out bit by bit for our new SDK).
What are some ways of doing this? Can I simply specify somethig in a code contract to warn of the use of a given assembly in the controller methods?