Including XML Comments in DataContract Serializer Metadata
Asked Answered
F

2

6

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

Friedcake answered 7/7, 2010 at 21:18 Comment(0)
S
5

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.

Spillar answered 7/7, 2010 at 21:58 Comment(1)
WCFExtrasPlus has moved to GitHub. Here: github.com/lamronby/wcfextrasplusUniformity
T
1

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.

Teter answered 7/7, 2010 at 21:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.