How can i ignore a property by decorating a property with an attribute? the base class AttributePropertyConvention
doesn't seems to have that ability, or can it? Doesn't find anything sutiable on IPropertyInstance
to set..
views:
55answers:
1
A:
it was very easy:
public class IgnoreAttributeConvention : AttributePropertyConvention<IgnoreAttribute>
{
protected override void Apply(IgnoreAttribute attribute, IPropertyInstance instance)
{
instance.ReadOnly();
}
}
where IgnoreAttribute is a simple/empty attribute.
Carl Hörberg
2010-01-12 14:20:52