You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specify BindingFlags.NonPublic to include non-public properties (that is, private, internal, and protected properties) in the search. Only protected and internal properties on base classes are returned; private properties on base classes are not returned.
But the code only returns private properties for BindingFlags.NonPublic
The solution to this can probably be done similar to #2448 (replacing p.GetMethod.IsPrivate with !p.GetMethod.IsPublic), so the main issue is to write some tests that capture the intended behaviour.
The text was updated successfully, but these errors were encountered:
As the documentation states "Specify BindingFlags.NonPublic
to include non-public properties (that is, private, internal,
and protected properties) in the search.
Fixes#2465
When debugging #2448 I noticed that the filtering of properties in
ApplyBindingFlags
has the same problem as filtering of methods in #2448. The documentation sayshttps://msdn.microsoft.com/en-us/library/kyaxdd3x(v=vs.110).aspx#Remarks
But the code only returns private properties for
BindingFlags.NonPublic
nunit/src/NUnitFramework/framework/Compatibility/ReflectionExtensions.cs
Lines 346 to 349 in 6980e95
The solution to this can probably be done similar to #2448 (replacing
p.GetMethod.IsPrivate
with!p.GetMethod.IsPublic
), so the main issue is to write some tests that capture the intended behaviour.The text was updated successfully, but these errors were encountered: