XML注释不出现在WCF服务中 [英] XML Comments not appearing in WCF Service
问题描述
我有一个WCF服务,并评论我的操作合同如下:
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);
然而,我把上面的3个正斜杠放在XML的注释///不出现在在我的客户端应用程序中消耗它的工具提示,这是标准的WCF / Web服务功能?他们永远不会出现? OR是否有办法使它们出现?
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?
推荐答案
Xml文档注释通常不集成到WCF服务的生成WSDL 。此信息通常仅在适当的xml文档文件与直接引用的程序集共存时才可用。
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.
生成的WSDL(或MEX端点提供的元数据)中包含的唯一信息是合同属性本身的属性。请查看以下文档:
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:
- ServiceContract
- OperationContract
- DataContract
- DataMember
- MessageContract
- MessageHeader
- MessageBodyMember
- FaultContract
- ServiceContract
- OperationContract
- DataContract
- DataMember
- MessageContract
- MessageHeader
- MessageBodyMember
- FaultContract
这篇关于XML注释不出现在WCF服务中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!