This project has moved and is read-only. For the latest updates, please go here.


Topics: User Forum
Oct 25, 2007 at 7:23 AM
May I suggest a change in the cppcommentsfixup handling. At the moment it removes a generic backtick in a few special cases using the following regex

(member name=".?System\.Collections\.Generic.?)(`0-9+)

In my testing I have found out that the cpp compiler always adds the backtick when referring to a generic type (which probably is more correct but since th c# and vb compilers don't do it the cpp needs a fixup) not only for collections

The best rule I have found is to remove any backtick expression before a "{". i.e. the pattern "`[0-9]+\{". Note that it can occur in several places within the member name attribute. Both as the member name and argument.

An complicated test example

member name="M:Namespace.Class'1.Member(Namespace.AnotherClass.Interface'2{System.Collections.Generic.KeyValuePair'3{System.Int32, System.Int32}})"

should be converted into

member name="M:Namespace.Class'1.Member(Namespace.AnotherClass.Interface{System.Collections.Generic.KeyValuePair{System.Int32, System.Int32}})"
Oct 25, 2007 at 12:23 PM
Edited Oct 25, 2007 at 12:26 PM
And if you update the comments fixup maybe you can fix another c++ specific problem at the same time.

The c++ compiler always tries to look up the cref references even if the reference includes the type.
If the reference is not found, it is prefixed with a "!:" so it will look like "!:T:Namespace..."

Because of the way c++ works (header files) it is extra difficult to get seealso links to work since they normally reference sibling classes that are not included in current compilation unit.

A fix would be to remove the "!" when the reference includes the type.
i.e. search for cref=\"!:([EFMNPT]|Overload): and replace with "cref=\"$1:"

edit: fixed square brackets
Oct 25, 2007 at 4:03 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.