Re: Include Verbose Description?



I do not want to do anything manual. I want to take the
developer-created comments automatically and expose them.

I do not mind changing my "///" comments to custom "comment"
Attributes or something, but I would need to see how to create that
Attribute class and how to get instances written into the WSDL at
build-time as CDATA or an equivalent.

Maybe something called "WebMethodCommentAttribute" with appropriate
de/serialization stuff so it can be shown in the WSDL?

Thanks.



On Mon, 09 Jul 2007 07:54:14 GMT, stcheng@xxxxxxxxxxxxxxxxxxxx (Steven
Cheng[MSFT]) wrote:

Hi Lucius,

For the webservice webmethod "description" attribute, if you mean manually
copy some comments(xml or plain text) into it, I think it is doable. You
can directly add xml content into it and they'll be displayed in the
webservice's WSDL document(in the "portType" section). e.g.

the following description setting (contains some XML datdad) will result to
the sequential WSDL portType fragment
===============
[WebMethod(Description=@"
<comment><param1>param1</param1><param2>param2</param2></comment>
")]

public string HelloWorld()
{
return "Hello World";
}
.


Loading