开发者

Is it possible to make VS specify the kind of type when building xml-comments?

I'm trying to create documentation for my code and I'm using xml-comments for it. When a class is documented like the following:

/// <summary>
/// Main presentation window
/// </summary>
public partial class mainWindow : Form
{
}

The xml file will contain the following entry for mainWindow:

<member name="T:CaseManager.mainWindow">
        <summary>
        Main presentation window
        </summary>
    </member>

The T in T:CaseManager.main开发者_StackOverflowWindow tells me it is "type: class, interface, struct, enum, delegate" and the rest tells me the namespace and name of the type. Is there anyway to make i specify what kind of type it is. For example by writing T:C:... for class, T:I:... for interface and so on.


According to MSDN, at least the compiler does not create something else or more specific.

Also, even if you somehow manage to specify those prefixes in your XML comments / source code (you can at some places, for example when referencing other stuff like <see cref="T:SomeType"/>) the compiler, ReSharper, and what not will complain about other prefixes than the supported ones.

Finally, you could create the XML file all on your own if you like. However, that is of course not practical and also other Tools like Sandcastle, that should process these XML files, will most likely not understand your convention.

So, short of writing your own toolset to extract comments and produce documentation from it, there doesn't seem to be a way to do what you ask. If that is at all acceptable, you might want to checkout doxygen, however I don't know what it is capable of in this regard.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜