[mono] Implement IgnoresAccessChecksToAttribute support (#48558)
* Implement IgnoresAccessChecksToAttribute support System.Runtime.CompilerServices.IgnoresAccessChecksToAttribute is like the reverse of InternalsVisibleTo - it's added to an assembly to indicate that that assembly can call non-public methods from the specified assembly. The main difference is that while InternalsVisibleTo allows access to `internal` members, IgnoresAccessChecksTo also allows access to `private` members. The interesting thing is that the DynamicProxy dynamically generates the attribute, so it is not explicitly declared in CoreLib. Fixes https://github.com/dotnet/runtime/issues/47989 * Add System.Reflection.Emit regression tests that throw MethodAccessException check that calling private/internal methods in another assembly throws. check that calling a private method in the same assembly throws.
Showing
想要评论请 注册 或 登录