在DataContract序列化器元数据中包含XML注释 [英] Including XML Comments in DataContract Serializer Metadata

查看:86
本文介绍了在DataContract序列化器元数据中包含XML注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过某种方式在DataContract中发送属性的摘要信息?

is there some way of sending the summary info of properties in a DataContract?

例如

[DataContract]
public class MyClass
{
  /// <summary>
  /// My Summary information
  /// </summary>
  [DataMember]
  public int MyProperty {get;set;}
}

这对获得数据合同的客户是否可用?我对此表示怀疑,只是希望有人知道我不知道的东西,这很有可能. :)

can this be available to the client that gets the datacontract? I doubt it, just hoping somebody knows something I don't, which is quite likely. :)

推荐答案

在CodePlex上查看 WCFExtras .我没有用过,但听起来确实可以满足您的要求:

Take a look at WCFExtras on CodePlex. I haven't used it, but it sounds like it does exactly what you want:

从源代码XML注释添加WSDL文档

此扩展允许您添加WSDL 文档(注释)直接 从源文件中的XML注释中. 这些评论将发布为 WSDL的一部分,可用于 知道如何使用的WSDL工具 它们的优势(例如Apache Axis wsdl2java等). 2.0版 还包括一个客户端WSDL 导入器将转换那些WSDL XML注释中的注释 生成的代理代码.

This extension allows you to add WSDL documentation (annotaiton) directly from XML comments in your source file. These comments will be published as part of the WSDL and are available for WSDL tools that know how to take advantage of them (e.g. Apache Axis wsdl2java and others). Release 2.0 also includes a client side WSDL importer that will turn those WSDL comments to XML comments in the generated proxy code.

这篇关于在DataContract序列化器元数据中包含XML注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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