My IntelliSense is comi开发者_StackOverflow中文版ng up with a boolean named parameter "AllInternalsVisible=" in an [assembly:InternalsVisibleTo("AssemblyName")]
declaration. Just position the cursor after the second double-quote and hit Ctrl-space. What is that - I cannot find any documentation on MSDN about that. I am using VS2005 and .Net 2.0.
As a related topic, I'm doing some research on friend assemblies, and I thought that once you grant a friend assembly access to internals, the friend assembly has access to ALL internals and you can't really get granular about it. Is that true, or is there a way (as suggested above) that you could grant a friend assembly access to some internal types/members but not all?
MSDN Says:
InternalsVisibleToAttribute..::.AllInternalsVisible Property
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
This property is not implemented.
In Silverlight, setting this to true means that everything with "friend" or "internal" visibility becomes visible to the other assembly. If it's not set, then only members with FriendAccessAllowed become visible.
In desktop .NET, the property is not used since all internal members always become visible, as you mentioned in your question.
Microsoft says:
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
This property is not implemented.
http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.allinternalsvisible.aspx
精彩评论