I need to know if there's any way (or another distinct approach) to an attribute knows something about what is being decorated for him. For example:
class Cat
{
public Cat() { }
[MyAttribute]
public House House { get; set; }
}
Inside MyAttribute
I must do some preprocessing with the house object...
class MyAttribute : Attribute
{
public MyAttribute()
{
var ob = // Discover the decorated property, do some changes and set it again
}
}
I don't know if it's the better way, neither if it actually can be done,