[Introspection] Fix intro skip when the properties are internal. (#18613)

This commit is contained in:
Manuel de la Pena 2023-08-02 07:46:45 -04:00 коммит произвёл GitHub
Родитель bfb8665d19
Коммит e4ed7e18bf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -170,8 +170,8 @@ namespace Introspection {
// FIXME: In the future we could cache this to reduce memory requirements
var property = m.DeclaringType
.GetProperties ()
.SingleOrDefault (p => p.GetGetMethod () == m || p.GetSetMethod () == m);
.GetProperties (BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)
.SingleOrDefault (p => p.GetGetMethod (true) == m || p.GetSetMethod (true) == m);
return property is not null && SkipDueToAttribute (property);
}