The code to determine if a property is readeble or writable just wrap the PropertyInfo CanRead and CanWirte.
`/// <summary>
/// Property Can Read
/// </summary>
public bool CanRead
{
get
{
switch (member.MemberType)
{
case MemberTypes.Property: return ((PropertyInfo)member).CanRead;
default: throw new NotSupportedException(member.MemberType.ToString());
}
}
}`
`/// <summary>
/// Property Can Write
/// </summary>
public bool CanWrite
{
get
{
switch (member.MemberType)
{
case MemberTypes.Property: return ((PropertyInfo)member).CanWrite;
default: throw new NotSupportedException(member.MemberType.ToString());
}
}
}`
IMHO in case of propeties FasMember should also check the value of PropertyInfo.GetMethod().IsPublic and PropertyInfo.SetMethod().IsPublic
I know that may be accessibile (getter or setter) even if not public (depending on where the fastmember code is executed) but at least add those two propeties to the Member instance should help to determine if the property is accessibile
The code to determine if a property is readeble or writable just wrap the PropertyInfo CanRead and CanWirte.
IMHO in case of propeties FasMember should also check the value of PropertyInfo.GetMethod().IsPublic and PropertyInfo.SetMethod().IsPublic
I know that may be accessibile (getter or setter) even if not public (depending on where the fastmember code is executed) but at least add those two propeties to the Member instance should help to determine if the property is accessibile