tags:

views:

110

answers:

1

During a run through Reflector to find the root cause of a bug in a WPF application, I stumbled across an internal attribute FriendAccessAllowedAttribute that is littered across many different classes, members, etc. However, I'm unable to locate what exactly uses this attribute (if anything). My guess is this is part of the C++/CLI infrastructure, but a search of MSDN, the C++/CLI spec, and the CLI spec reveals nothing. Is anybody aware of what it is used for?

+2  A: 

As I recall, it was a way to control dependencies between friend assemblies in the Framework. Basically, when you grant assembly A "friend" access to assembly B, you don't want all internal members of B to be made available to A, because then any change to such a member would potentially be breaking (also, it would increase the security surface area that needs to be reviewed). Pretty sure this attribute is honored in Silverlight, not sure about the full Framework.

Eugene Osovetsky
Yeah I spent a while digging in reflector, but didn't think to check out Silverlight.
sixlettervariables