get fields/props from base types as well,
ignore static fields/props
This commit is contained in:
parent
ac32e4be09
commit
d981a66d59
|
@ -38,7 +38,7 @@ public static class Fields
|
||||||
{
|
{
|
||||||
return instance
|
return instance
|
||||||
.GetType()
|
.GetType()
|
||||||
.GetFields(Instance | Static | Public | NonPublic)
|
.GetFields(Instance | Public | NonPublic | FlattenHierarchy)
|
||||||
.Select(fi => new Field(fi.IsStatic ? null : instance, fi));
|
.Select(fi => new Field(fi.IsStatic ? null : instance, fi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace InnovEnergy.Lib.Utils.Reflection
|
||||||
{
|
{
|
||||||
return instance
|
return instance
|
||||||
.GetType()
|
.GetType()
|
||||||
.GetProperties(Instance | Static | Public | NonPublic)
|
.GetProperties(Instance | Public | NonPublic | FlattenHierarchy)
|
||||||
.Where(p => p.GetIndexParameters().Length == 0) // no indexers please
|
.Where(p => p.GetIndexParameters().Length == 0) // no indexers please
|
||||||
.Select(pi => new Property(pi.IsStatic() ? null : instance, pi));
|
.Select(pi => new Property(pi.IsStatic() ? null : instance, pi));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue