XML 注释未出现在 WCF 服务中

发布于 2024-09-09 11:46:23 字数 521 浏览 3 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小清晰的声音 2024-09-16 11:46:23

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:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文