Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InternalsVisibleTo except for a few classes

I applied InternalsVisibleTo to one of my projects in order for its internals to be visible for test projects. However, (this is weird I know) I need to mark a few internal classes so that they won't be visible to the projects which is indicated through InternalsVisibleTo.

Is there any attribute I can apply for this that the compiler is aware of?

like image 503
tugberk Avatar asked Jan 21 '13 00:01

tugberk


1 Answers

Anderson Silva is correct. There is no way to do this. You should consider moving the types to a new assembly. Alternatively, you could think about applying the [EditorBrowsable(EditorBrowsableState.Never)] attribute to hide the types from IntelliSense, although if the user knows about them, the code will compile.

like image 168
Kevin Pilch Avatar answered Nov 12 '22 03:11

Kevin Pilch