private bool InPracticeInternalsVisibleTo(TypeWrapper caller)
{
#if !STATIC_COMPILER
if (DeclaringType.TypeAsTBD.Assembly.Equals(caller.TypeAsTBD.Assembly))
{
// both the caller and the declaring type are in the same assembly
// so we know that the internals are visible
// (this handles the case where we're running in dynamic mode)
return true;
}
#endif
return DeclaringType.InternalsVisibleTo(caller);
}