You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: