Можно ли проверить существование атрибута в коде другого атрибута?
Скажем, у вас есть следующее определение класса:
public class Inception {
[Required]
[MyTest]
public int Levels { get; set; }
}
public class MyTestAttribute : ValidationAttribute {
public override bool IsValid(object o){
// return whether the property on which this attribute
// is applied also has the RequiredAttribute
}
}
... возможно ли для MyTestAttribute.IsValid определить, имеет ли Inception.Levels RequiredAttribute?