2

Closed

Don't refactor parameter names in XML comments

description

I had a scenario where the refactored string value deifned in a method matched the name of a parameter. This method had XML comments defined for it. When the automatic refactoring made changes to the code, it went ahead and converted the parameter name in the comments. For example:
 
/// <summary>
/// This is my method
/// </summary>
/// <param name="aTextValue">My parameter</param>
protected void MyMethod(string aTextValue)
{
  string s;
 
  if(String.IsNullOrEmpty(aTextValue))
     s = "aTextValue";
  else
     s = aTextValue;
 
  // do something with s ...
}
 
this will get refactored as:
 
  /// <summary>
  /// This is my method
  /// </summary>
  /// <param name=Resources.TextValue>My parameter</param>
  protected void MyMethod(string aTextValue)
  {
     string s;
 
     if(String.IsNullOrEmpty(aTextValue))
        s = Resources.TextValue;
     else
        s = aTextValue;
 
     // do something with s ...
  }
 
Please consider not refactoring quoted values that are defined in the XML comments blocks.
Closed Feb 1, 2007 at 5:25 PM by bertanaygun
Resolved with changeset 17580.

comments

bertanaygun wrote Feb 1, 2007 at 2:36 PM

We are fixing this issue as part of 1.0 release.

wrote Feb 1, 2007 at 5:25 PM

wrote Feb 14, 2013 at 6:02 PM

wrote May 16, 2013 at 8:36 AM