我有自定义属性...
[System.AttributeUsage(System.AttributeTargets.All)]
public class Refactor : System.Attribute
{
private string _message;
public Refactor()
{
_message = string.Empty;
}
public Refactor(string message)
{
_message = message;
}
}
申请
[Refactor("this should be less rubbish")]
public virtual void RubbishMethod()
{
…
}
现在当有人打电话给RubbishMethod
时,我希望IDE(vs2008)用深棕色强调该调用,类似于我标记为过时,你会得到绿色波浪线。这可能吗?我一直绞尽脑汁打击谷歌,但我无法找到如何以及在哪里做到这一点。