473,396 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Re-using XML comments

It's a bit of a PITA to duplicate XML comments in such a scenario as where
you want to give a class method implementing an interface method exactly the
same documentation (or part thereof) as the interface method, and keep them
in synch.

Are there any documentation tools, possibly using custom tags, available
which can support such a
feature?

Feb 1 '06 #1
6 1568
Clive,

I agree with you 100% that it is a pain to do this. Unfortunately,
there is nothing like a "reference" to other XML comments that I am aware
of. You would need a third party tool to handle all of this

This is also desirable for overloaded methods where the description is
the same, but the parameters differ slightly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Clive Dixon" <cl*******************@digita.noluncheonmeat.com > wrote in
message news:uz**************@TK2MSFTNGP11.phx.gbl...
It's a bit of a PITA to duplicate XML comments in such a scenario as where
you want to give a class method implementing an interface method exactly
the
same documentation (or part thereof) as the interface method, and keep
them in synch.

Are there any documentation tools, possibly using custom tags, available
which can support such a
feature?

Feb 1 '06 #2
I guess it must be possible using NDoc's extensibility features, but that
would be a project in itself (especially as I'm far from an XSLT expert).

Let's hope for improved support in C# 3.0...

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uH**************@TK2MSFTNGP15.phx.gbl...
Clive,

I agree with you 100% that it is a pain to do this. Unfortunately,
there is nothing like a "reference" to other XML comments that I am aware
of. You would need a third party tool to handle all of this

This is also desirable for overloaded methods where the description is
the same, but the parameters differ slightly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Clive Dixon" <cl*******************@digita.noluncheonmeat.com > wrote in
message news:uz**************@TK2MSFTNGP11.phx.gbl...
It's a bit of a PITA to duplicate XML comments in such a scenario as
where
you want to give a class method implementing an interface method exactly
the
same documentation (or part thereof) as the interface method, and keep
them in synch.

Are there any documentation tools, possibly using custom tags, available
which can support such a
feature?


Feb 1 '06 #3
Clive,

Fortunately, there is a way for your voice to be heard:

http://lab.msdn.microsoft.com/produc...k/default.aspx

Put in a recommendation (or support an existing one that suits your
needs), and it will be entered into their internal system.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Clive Dixon" <cl*******************@digita.noluncheonmeat.com > wrote in
message news:eU**************@tk2msftngp13.phx.gbl...
I guess it must be possible using NDoc's extensibility features, but that
would be a project in itself (especially as I'm far from an XSLT expert).

Let's hope for improved support in C# 3.0...

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:uH**************@TK2MSFTNGP15.phx.gbl...
Clive,

I agree with you 100% that it is a pain to do this. Unfortunately,
there is nothing like a "reference" to other XML comments that I am aware
of. You would need a third party tool to handle all of this

This is also desirable for overloaded methods where the description is
the same, but the parameters differ slightly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Clive Dixon" <cl*******************@digita.noluncheonmeat.com > wrote in
message news:uz**************@TK2MSFTNGP11.phx.gbl...
It's a bit of a PITA to duplicate XML comments in such a scenario as
where
you want to give a class method implementing an interface method exactly
the
same documentation (or part thereof) as the interface method, and keep
them in synch.

Are there any documentation tools, possibly using custom tags, available
which can support such a
feature?



Feb 1 '06 #4
Use the <include> tag to include external file comments. This way you can
include the same comments for multiple items.

See:
http://msdn.microsoft.com/library/de...lrfinclude.asp
--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"Clive Dixon" <cl*******************@digita.noluncheonmeat.com > wrote in
message news:eU**************@tk2msftngp13.phx.gbl...
I guess it must be possible using NDoc's extensibility features, but that
would be a project in itself (especially as I'm far from an XSLT expert).

Let's hope for improved support in C# 3.0...

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:uH**************@TK2MSFTNGP15.phx.gbl...
Clive,

I agree with you 100% that it is a pain to do this. Unfortunately,
there is nothing like a "reference" to other XML comments that I am aware
of. You would need a third party tool to handle all of this

This is also desirable for overloaded methods where the description is
the same, but the parameters differ slightly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Clive Dixon" <cl*******************@digita.noluncheonmeat.com > wrote in
message news:uz**************@TK2MSFTNGP11.phx.gbl...
It's a bit of a PITA to duplicate XML comments in such a scenario as
where
you want to give a class method implementing an interface method exactly
the
same documentation (or part thereof) as the interface method, and keep
them in synch.

Are there any documentation tools, possibly using custom tags, available
which can support such a
feature?



Feb 1 '06 #5
The problem with <include> and with any scheme for referencing comments
somewhere else is that they are far more likely to become out of step with
the code than those actually with the method for 2 reasons:

1) Nobody looking at the method will bother checking that the comments are
correct if they are somewhere else.
2) Nobody changing the "primary" comment will ever look for all the places
in which it is used to ensure that it still holds.

I think copy and paste is probably the best of a bad set of options.

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:u3**************@TK2MSFTNGP15.phx.gbl...
Use the <include> tag to include external file comments. This way you can
include the same comments for multiple items.

See:
http://msdn.microsoft.com/library/de...lrfinclude.asp
--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"Clive Dixon" <cl*******************@digita.noluncheonmeat.com > wrote in
message news:eU**************@tk2msftngp13.phx.gbl...
I guess it must be possible using NDoc's extensibility features, but that
would be a project in itself (especially as I'm far from an XSLT expert).

Let's hope for improved support in C# 3.0...

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:uH**************@TK2MSFTNGP15.phx.gbl...
Clive,

I agree with you 100% that it is a pain to do this. Unfortunately,
there is nothing like a "reference" to other XML comments that I am
aware of. You would need a third party tool to handle all of this

This is also desirable for overloaded methods where the description
is the same, but the parameters differ slightly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Clive Dixon" <cl*******************@digita.noluncheonmeat.com > wrote in
message news:uz**************@TK2MSFTNGP11.phx.gbl...
It's a bit of a PITA to duplicate XML comments in such a scenario as
where
you want to give a class method implementing an interface method
exactly the
same documentation (or part thereof) as the interface method, and keep
them in synch.

Are there any documentation tools, possibly using custom tags,
available which can support such a
feature?




Feb 1 '06 #6
This particular scenario wasn't mentioned, but someone did ask Anders
Hejlsberg at PDC'05 whether there shouldn't be some way to share
comments between overloads. Anders thought it was a good idea, although
I don't know that it was recorded anywhere.

So, if you put in a suggestion to that effect, it's likely to get a
favourable reception.

Feb 1 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nel | last post by:
I have a question related to the "security" issues posed by Globals ON. It is good programming technique IMO to initialise variables, even if it's just $foo = 0; $bar = ""; Surely it would...
1
by: Chris | last post by:
Sorry to post so much code all at once but I'm banging my head against the wall trying to get this to work! Does anyone have any idea where I'm going wrong? Thanks in advance and sorry again...
11
by: James | last post by:
My form and results are on one page. If I use : if ($Company) { $query = "Select Company, Contact From tblworking Where ID = $Company Order By Company ASC"; }
4
by: Alan Walkington | last post by:
Folks: How can I get an /exec'ed/ process to run in the background on an XP box? I have a monitor-like process which I am starting as 'exec("something.exe");' and, of course the exec function...
1
by: John Ryan | last post by:
What PHP code would I use to check if submitted sites to my directory actually exist?? I want to use something that can return the server code to me, ie HTTP 300 OK, or whatever. Can I do this with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.