XML 注释未出现在 WCF 服务中
我有一个 WCF 服务,并对我的操作合同进行了如下注释:
/// <summary>
/// Call to topup a card.
/// </summary>
/// <param name="topUp">The TopUp object which specifies the card to topup.</param>
/// <returns>Returns a boolean indicating whether call has finished successfully. </returns>
[OperationContract]
bool UploadTopUp(TopUp topUp);
但是,我在上面的 3 个正斜杠中放入的 XML 注释 /// 没有出现在使用它的客户端应用程序的工具提示中,这是标准的 WCF/web服务功能?他们永远不会出现吗?或者有没有办法让它们出现?
I have a WCF service and commenting my operation contracts as below:
/// <summary>
/// Call to topup a card.
/// </summary>
/// <param name="topUp">The TopUp object which specifies the card to topup.</param>
/// <returns>Returns a boolean indicating whether call has finished successfully. </returns>
[OperationContract]
bool UploadTopUp(TopUp topUp);
However the XML comments I am putting in the 3 forward slashes as above /// do not appear in the tooltips in my client application that consumes it, is this standard WCF/web service functionality? Will they never appear? OR is there a way to make them appear?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Xml Doc 注释通常不会集成到为 WCF 服务生成的 WSDL 中。通常仅当适当的 xml 文档文件与直接引用的程序集位于同一位置时,此信息才可用。
生成的 WSDL(或 MEX 端点提供的元数据)中包含的唯一信息是合约属性本身的属性。检查以下文档:
Xml Doc comments are generally not integrated into the generated WSDL for a WCF service. This information is usually only available when the appropriate xml documentation file is co-located with a directly referenced assembly.
The only information that is included in a generated WSDL (or metadata provided by a MEX endpoint) are the properties of the contract attributes themselves. Check the documentation for the following: