Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 9d7584d

Browse files
committed
Use the correct call to get properties, DeclaredProperties does not return properties for a base class
1 parent f09a1f3 commit 9d7584d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mscorlib/src/System/Diagnostics/Eventing/StubEnvironment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static class ReflectionExtensions
226226
public static bool IsGenericType(this Type type) { return type.IsConstructedGenericType; }
227227
public static Type BaseType(this Type type) { return type.GetTypeInfo().BaseType; }
228228
public static Assembly Assembly(this Type type) { return type.GetTypeInfo().Assembly; }
229-
public static IEnumerable<PropertyInfo> GetProperties(this Type type) { return type.GetTypeInfo().DeclaredProperties; }
229+
public static IEnumerable<PropertyInfo> GetProperties(this Type type) { return type.GetRuntimeProperties(); }
230230
public static MethodInfo GetGetMethod(this PropertyInfo propInfo) { return propInfo.GetMethod; }
231231
public static Type[] GetGenericArguments(this Type type) { return type.GenericTypeArguments; }
232232

0 commit comments

Comments
 (0)