Open nawfalhasan opened 1 year ago
Currently there is very limited info exposed by Member class. I cannot determine whether the property is a regular one or an indexer one.
Member
Problem description: When I try to read all properties of a type dynamically, like this:
TypeAccessor accessor = TypeAccessor.Create(type); var values = accessor.GetMembers().Where(m => m.CanRead).Select(m => accessor[item, m.Name]).ToList();
I get an exception when the member is an indexer. I would like to skip indexers in the above query.
Suggestion: Can we expose this information as well ? Or worst case, expose the whole MemberInfo which is a private field now.
MemberInfo
Otherwise, how do I avoid the exception in the above case?
Original SO question. And related PR - https://github.com/mgravell/fast-member/pull/102 .
Currently there is very limited info exposed by
Member
class. I cannot determine whether the property is a regular one or an indexer one.Problem description:
When I try to read all properties of a type dynamically, like this:
I get an exception when the member is an indexer. I would like to skip indexers in the above query.
Suggestion:
Can we expose this information as well ? Or worst case, expose the whole
MemberInfo
which is a private field now.Otherwise, how do I avoid the exception in the above case?