In a VS2010 Add-In in C#, how do you get the name and signature of the method your cursor is currently in?
I want to create an add-in that when run, gets the name and signature of the current method and then adds an "in" and "out" log message for that method.
Example:
Before:
public void TheMethod(string text)
{
...
return text;
}
After:
public void TheMethod(string text)
{
log.Trace("public void TheMethod( string text =" + text + " ) - in");
...
log.Trace("public void TheMethod( ... ) - out with text = " + text );
return text;
}
Are there any add-in tutorials/links that cover getting method info, seeing the top and bottom of a method, inserting text, etc? I've tried Googling and I'm not getting myc that's helpful.