Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including XML Comments in DataContract Serializer Metadata

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

e.g.

[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. :)

like image 645
Jose Avatar asked Jul 07 '10 21:07

Jose


2 Answers

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

Adding WSDL Documentation from Source Code XML Comments

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.

like image 102
Quartermeister Avatar answered Nov 09 '22 09:11

Quartermeister


If you're referring to the XML comments, then no, they cannot be sent. There is noplace within a WSDL in which they could be sent in such a way that a client could use them.

like image 36
John Saunders Avatar answered Nov 09 '22 10:11

John Saunders