get fields/props from base types as well,

ignore static fields/props
This commit is contained in:
ig 2023-05-04 09:44:55 +02:00
parent ac32e4be09
commit d981a66d59
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ public static class Fields
{
return instance
.GetType()
.GetFields(Instance | Static | Public | NonPublic)
.GetFields(Instance | Public | NonPublic | FlattenHierarchy)
.Select(fi => new Field(fi.IsStatic ? null : instance, fi));
}

View File

@ -42,7 +42,7 @@ namespace InnovEnergy.Lib.Utils.Reflection
{
return instance
.GetType()
.GetProperties(Instance | Static | Public | NonPublic)
.GetProperties(Instance | Public | NonPublic | FlattenHierarchy)
.Where(p => p.GetIndexParameters().Length == 0) // no indexers please
.Select(pi => new Property(pi.IsStatic() ? null : instance, pi));
}