IDE underlining custom attributes

Posted by runrunraygun on Stack Overflow See other posts from Stack Overflow or by runrunraygun
Published on 2010-04-08T10:06:34Z Indexed on 2010/04/08 10:43 UTC
Read the original article Hit count: 465

I have a custom attribute...

[System.AttributeUsage(System.AttributeTargets.All)]
public class Refactor : System.Attribute
{
    private string _message;

    public Refactor()
    {
        _message = string.Empty;
    }

    public Refactor(string message)
    {
        _message = message;
    }               
}

Applied to

[Refactor("this should be less rubbish")]
public virtual void RubbishMethod()    
{    
…    
}

Now when someone makes a call to RubbishMethod I'd like the IDE (vs2008) to underline that call in a deep brown colour, similar to if I mark as Obsolete you get a green wave line. Is this possible? I've been racking my brain and hitting the google but I can't find how and where to do this.

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about ide