Decouple classes from each other through the use of interfaces. You can have all interfaces declared inside the Processor
library, or better yet in a separate library, shared between Client
, Admin
and Processor
projects. Then you could do the checks like form is IRoof
or form is ICanopy
.
Note however, in this case nothing would prevent Admin
from implementing ICanopy
or Client
from doing IRoof
. If this is really an issue, make the interfaces internal
, and control their visibility to other assemblies via [assembly: InternalsVisibleTo("Assembly")]
(see "Friend Assemblies").
Further, search the web for "Dependency Injection".