添加URL到.NET XML评论 [英] Adding URL to .NET XML Comments

查看:127
本文介绍了添加URL到.NET XML评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能XML注释添加到一个方法,可以让其他程序员通过单击工具提示中遵循的网址是什么?



我曾尝试加入URL使用以下格式(我用看也尝试与另见标记)的方法:

  ///< ;总结> 
///加载一些数据。
///< A HREF =http://stackoverflow.com/>点击ME< / A>
///< /总结>
///< PARAM NAME =ID>该ID< /参数>
///<退货和GT;有的数据和LT; /回报>
私人字符串LoadData(INT ID)

这会产生一个可点击的超链接URL,但是看着原来的源代码时,这仅适用。如果可能的话,我想徘徊时通过调用方法,而不是方法本身单击并按照显示工具提示超链接的能力。


解决方案

如果可能,我愿意点击,并按照悬停在调用方法时显示在工具提示超
链接的能力,
,而不是方法本身。




如果我明白你的问题正确,您希望像图所示$ b图像中$ b



如果是这样您的XML注释是正确的,为了得到这把光标放在方法和Ctrl + Q,这是一个短暂的ReSharper的得到记录的方法帮助



< STRONG>更新:下面的图像,以确认按Ctrl + Q是ReSharper的快捷键


Is it possible to add XML comments to a method, that allows other programmers to follow the URL by clicking on it in the tooltip?

I have tried adding a URL to a method using the following format (I have also tried using the see and see also tags):

/// <summary>
/// Loads some data.
/// <a href="http://stackoverflow.com/">click me</a>
/// </summary>
/// <param name="id">The id.</param>
/// <returns>Some Data</returns>
private string LoadData(int id)

This produces a click-able hyper link to the URL, however this only works when looking at the original source code. If possible I would like to the ability to click and follow the hyper link in the tool tip shown when hovering over a call to the method, rather than the method itself.

解决方案

If possible I would like to the ability to click and follow the hyper link in the tool tip shown when hovering over a call to the method, rather than the method itself.

If I understood you question correctly you expect something like shown in the image below

If yes this your Xml comments are correct and in order to get this put your cursor on the method and Ctrl+Q this is a short for Resharper to get documented help of the method

Update : Below image is to confirm Ctrl+Q is a ReSharper shortcut

这篇关于添加URL到.NET XML评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆