473,396 Members | 1,797 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.

Ndoc: tags inside the methods

Hello,
I posted this question on the NDoc-user mailing list, but it looks like
a dead list (no messages for 10 days!).

I'd like to use NDoc tags or custom tags inside methods like:
void Mymethod() {
.....
<mytag>...</mytag>
....
}

NDoc generates documentation for tags outside the methods, but not for
tags inside. I didn't see any documenter that would allow me to do that.

Any idea?

Thanks
Julien
Nov 17 '05 #1
11 1390
On Fri, 29 Apr 2005 23:45:33 -0400, julien <ju****@sobrier.net> wrote:
Hello,
I posted this question on the NDoc-user mailing list, but it looks like
a dead list (no messages for 10 days!).
Try posting to the SourceForge forums for NDoc, they're always
monitored by the developers.
I'd like to use NDoc tags or custom tags inside methods like:
void Mymethod() {
....
<mytag>...</mytag>
...
}

NDoc generates documentation for tags outside the methods, but not for
tags inside. I didn't see any documenter that would allow me to do that.


That's not possible. NDoc only processes the XML files created by the
C# compiler, and the C# compiler only extracts the XML comments that
are specified by the C# standard -- at the top of methods or classes.

You could write your own source code processor that mixes those inline
comments into the compiler-generated XML files, though...
--
http://www.kynosarges.de
Nov 17 '05 #2
julien wrote:
Hello,
I posted this question on the NDoc-user mailing list, but it looks like
a dead list (no messages for 10 days!).

I'd like to use NDoc tags or custom tags inside methods like:
void Mymethod() {
.....
<mytag>...</mytag>
....
}

NDoc generates documentation for tags outside the methods, but not for
tags inside. I didn't see any documenter that would allow me to do that.

Any idea?

Thanks
Julien


Try to use custom attributes.
Nov 17 '05 #3
On Sat, 30 Apr 2005 14:08:05 +0400, Gelios <ge****@rbcmail.ru> wrote:
Try to use custom attributes.


Are you sure this reply has anything to do with the question?
--
http://www.kynosarges.de
Nov 17 '05 #4
Christoph Nahr wrote:
On Sat, 30 Apr 2005 14:08:05 +0400, Gelios <ge****@rbcmail.ru> wrote:

Try to use custom attributes.

Are you sure this reply has anything to do with the question?

I just want to show direction of future investigations.
Guess explaining custom attributes will take a lot of pages and I think it will be better to read some book.
OK, probably I wasn't right.
About custom attributes author of first question can read in Wrox Press - Professional C#, 3rd Edition book.
I even ready to send e-book, but it's size about 10 Mb in zip.
Nov 17 '05 #5
Gelios <ge****@rbcmail.ru> wrote:
Are you sure this reply has anything to do with the question?
I just want to show direction of future investigations.


I don't think investigating attibutes would help the OP at all though -
it's separate from doc comments, which basically can't appear (or at
least are ignored) within methods.

One potential direction of future investigation would be the Mono C#
compiler, which could be modified to make use of doc comments within
methods.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #6
Christoph Nahr a écrit :
I'd like to use NDoc tags or custom tags inside methods like:
void Mymethod() {
....
<mytag>...</mytag>
...
}

NDoc generates documentation for tags outside the methods, but not for
tags inside. I didn't see any documenter that would allow me to do that.



That's not possible. NDoc only processes the XML files created by the
C# compiler, and the C# compiler only extracts the XML comments that
are specified by the C# standard -- at the top of methods or classes.

You could write your own source code processor that mixes those inline
comments into the compiler-generated XML files, though...


Thank you for the information.
Nov 17 '05 #7

"julien" <ju****@sobrier.net> wrote in message
news:42***********************@news.free.fr...
Hello,
I posted this question on the NDoc-user mailing list, but it looks like a
dead list (no messages for 10 days!).

I'd like to use NDoc tags or custom tags inside methods like:
void Mymethod() {
....
<mytag>...</mytag>
...
}

While others have already pointed out the compiler doesn't support this,
could I ask what you are trying to achieve? What particular code constructs
would you want to document?
Thanks
Julien

Nov 17 '05 #8
Sounds interesting, but I'd like to play Devil's Advocate for a moment...

What good is external documentation on lines of code that aren't also present? I mean that if you document your actual code, don't
you need to look at the code for the documentation to make any sense?

So my next question is, will this "inline-documenter" pull out code snippets to? Personally, I'd rather just look at the source.
Just my opinion, although nobody asked ;)

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message news:MP************************@msnews.microsoft.c om...
Gelios <ge****@rbcmail.ru> wrote:
> Are you sure this reply has anything to do with the question?

I just want to show direction of future investigations.


I don't think investigating attibutes would help the OP at all though -
it's separate from doc comments, which basically can't appear (or at
least are ignored) within methods.

One potential direction of future investigation would be the Mono C#
compiler, which could be modified to make use of doc comments within
methods.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #9
On Sun, 1 May 2005 00:05:07 -0400, "Dave"
<NO*********@dotcomdatasolutions.com> wrote:
Sounds interesting, but I'd like to play Devil's Advocate for a moment...

What good is external documentation on lines of code that aren't also present? I mean that if you document your actual code, don't
you need to look at the code for the documentation to make any sense?
Sometimes a method may exhibit strange behavior or usage restrictions
that are due to some old bug in Windows 2000 or whatever. It would
make sense to document such special behavior right next to the code
where it's implemented, so you don't accidentally forget to modify the
comments when changing the code.
So my next question is, will this "inline-documenter" pull out code snippets to? Personally, I'd rather just look at the source.
Just my opinion, although nobody asked ;)


Actually, this idea already exists -- it's called "literary
programming". You write a paragraph or two of explanations for every
few lines of code. The whole thing is run through a typesetter (TeX)
for printable documentation with code snippets, or through a
preprocessor that strips the explanations to get source code.

Has never caught on outside the academic community, though...
--
http://www.kynosarges.de
Nov 17 '05 #10
Pulling out inline-comments w/code snippets still seems strange to me though. When I write code, and add inline comments, the
comments usually have something to do with the context of the code. i.e., It wouldn't make sense to say, pull out the comment and
the line right after it.

So how could any "TeX" possibly know what code is required for any particular comment?

In the case for handling "strange behavior" or "bug fixes" I believe the same is true. This would be something in, say, the
"remarks" section on a method. Inline comments would be useful for identifying the exact block or line of code that applies to the
remarks, but would it really be useful if extracted?
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Christoph Nahr" <ch************@kynosarges.de> wrote in message news:a3********************************@4ax.com...
On Sun, 1 May 2005 00:05:07 -0400, "Dave"
<NO*********@dotcomdatasolutions.com> wrote:
Sounds interesting, but I'd like to play Devil's Advocate for a moment...

What good is external documentation on lines of code that aren't also present? I mean that if you document your actual code,
don't
you need to look at the code for the documentation to make any sense?


Sometimes a method may exhibit strange behavior or usage restrictions
that are due to some old bug in Windows 2000 or whatever. It would
make sense to document such special behavior right next to the code
where it's implemented, so you don't accidentally forget to modify the
comments when changing the code.
So my next question is, will this "inline-documenter" pull out code snippets to? Personally, I'd rather just look at the source.
Just my opinion, although nobody asked ;)


Actually, this idea already exists -- it's called "literary
programming". You write a paragraph or two of explanations for every
few lines of code. The whole thing is run through a typesetter (TeX)
for printable documentation with code snippets, or through a
preprocessor that strips the explanations to get source code.

Has never caught on outside the academic community, though...
--
http://www.kynosarges.de

Nov 17 '05 #11
On Sun, 1 May 2005 08:50:09 -0400, "Dave"
<NO*********@dotcomdatasolutions.com> wrote:
So how could any "TeX" possibly know what code is required for any particular comment?
TeX is the name of a popular open-source typesetting system. It
doesn't know anything -- the point of literate programming is to write
code & documentation together, in a single text file (per class or
whatever), but marked up differently so that extraction is automatic.

Google on "literate programming" (not "literary" -- sorry, that was
misspelled in my previous post). Or just have a look at the examples
at http://www.literateprogramming.com/.
In the case for handling "strange behavior" or "bug fixes" I believe the same is true. This would be something in, say, the
"remarks" section on a method. Inline comments would be useful for identifying the exact block or line of code that applies to the
remarks, but would it really be useful if extracted?


My point with this example was that the "remarks" section is removed
from the actual lines of code they are commenting. With inline
comments that can be extracted, you could have code and comments in
close vicinity but still format the comments nicely for documentation.
--
http://www.kynosarges.de
Nov 17 '05 #12

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

Similar topics

2
by: Sagar | last post by:
Hi Friends, Please forgive me if this question has appeared before. If so please give me a link or some clue on this problem. I'm writing XML comments to build Comment Web Pages by using...
2
by: Henrik Dahl | last post by:
Hello! I'm trying to use NDOC and definitely it seems like there are many comprehensible options to benefit from. Do some of you know if there is a manual for NDOC somewhere which makes it...
0
by: L | last post by:
Hi, I am trying NDoc for the first time and here is my problem. In my project, I am using <summary> <pre> my text here in specific format. hello. etc... </pre>
2
by: Sapthar | last post by:
Hi all, My problem is as follows: I have installed the latest NDOC (1.3). I see that some of the XML comments are not getting included in the CHM file. These comments are there in the XML...
0
by: GearsR4Girls | last post by:
I wish to use custom tags for NDoc. I recognise i need to have a template xslt file whose path is specified in NDoc under the ExtensibilityStyleSheet heading. I have copied the XSLT from the NDoc...
0
by: Brendan | last post by:
Hi All, I am working on a project that requires documentation to be produced for the code. I am using ndoc version 2 and VB Commentor to produce the .chm files. Unfortunatley it does not pick...
6
by: Ray Cassick \(Home\) | last post by:
I have a set of properties in my assembly that look like this: ''' <overloads> ''' Allows the caller to have get or set access to an item in the collection. ''' </overloads> ''' <summary> '''...
2
by: rony.vainblat | last post by:
hi, i am looking for an examles , how to make my own tags in nDoc . can any one help me , please.
4
by: brandonkirsch | last post by:
Hey guys, I recently lost hours to the PHP 5.2.1 SoapClient when trying to use a remote webservice. There are two methods I have to use, the first one worked like a charm and the second one has...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.