473,461 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Wanted in C# 2.0: Namespace documentation

Namespaces don't have <summary> documentation (do they?), and I think it
would be nice to have it. For instance,

/// <summary>
/// Classes containing math functions.
/// </summary>
namespace BillyBob.Math {
...
}

Now if you had more than one <summary> compiled with a namespace, such as
having two class files each with a different <summary> for its otherwise
identical namespace, then the consumer could be able to cycle through the
different summary descriptions... it should be an array of descriptions.

Might be a little messy I suppose, but it's better than no descriptions at
all.

Sometimes people deliver things in the strangest namespaces ...

Jon
Nov 16 '05 #1
10 4556
On Tue, 18 May 2004 23:16:09 -0700, "Jon Davis"
<jo*@REMOVE.ME.jondavis.net> wrote:
Namespaces don't have <summary> documentation (do they?), and I think it
would be nice to have it.


Agreed. The standard excuse why they don't exist yet is that a
namespace declaration typically appears in many different files, so
the compiler might get confused by multiple summary tags.

Personally I think that's easy enough to resolve by simply taking the
last summary tag found, and ignoring all others while emitting a
warning. It's the programmer's responsibility to only use one tag.
--
http://www.kynosarges.de
Nov 16 '05 #2
"Christoph Nahr" <ch************@kynosarges.de> wrote in
news:lb********************************@4ax.com...
On Tue, 18 May 2004 23:16:09 -0700, "Jon Davis"
<jo*@REMOVE.ME.jondavis.net> wrote:
Namespaces don't have <summary> documentation (do they?), and I think it
would be nice to have it.


Agreed. The standard excuse why they don't exist yet is that a
namespace declaration typically appears in many different files, so
the compiler might get confused by multiple summary tags.


I've read that classes could be spread over multiple files in C# 2 -
wouldn't that cause exactly the same confusion?

Niki
Nov 16 '05 #3
On Wed, 19 May 2004 10:00:48 +0200, "Niki Estner"
<ni*********@cube.net> wrote:
I've read that classes could be spread over multiple files in C# 2 -
wouldn't that cause exactly the same confusion?


Yes, it would. I don't know what the proposed solution for this case
is -- maybe there's a distinction between a "main class file" and
"continuation" class files, and only the main file can have comments?
--
http://www.kynosarges.de
Nov 16 '05 #4
Actually, you can document namespaces already, but it needs to be done in an
external file IIRC. I don't remember if the MS tools can use it, or if you
need to use NDoc. If you do a bit of a search, you should be able to find
some information about it. Unfortunately the project where I used it was 2
computers ago and I don't seem to have put my build scripts and the
namespace documentation into source control.

If I find more info, I'll post it to this thread.

Colin

"Jon Davis" <jo*@REMOVE.ME.jondavis.net> wrote in message
news:eg**************@TK2MSFTNGP12.phx.gbl...
Namespaces don't have <summary> documentation (do they?), and I think it
would be nice to have it. For instance,

/// <summary>
/// Classes containing math functions.
/// </summary>
namespace BillyBob.Math {
...
}

Now if you had more than one <summary> compiled with a namespace, such as
having two class files each with a different <summary> for its otherwise
identical namespace, then the consumer could be able to cycle through the
different summary descriptions... it should be an array of descriptions.

Might be a little messy I suppose, but it's better than no descriptions at
all.

Sometimes people deliver things in the strangest namespaces ...

Jon

Nov 16 '05 #5
Christoph Nahr wrote:
On Tue, 18 May 2004 23:16:09 -0700, "Jon Davis"
<jo*@REMOVE.ME.jondavis.net> wrote:

Namespaces don't have <summary> documentation (do they?), and I think it
would be nice to have it.

Agreed. The standard excuse why they don't exist yet is that a
namespace declaration typically appears in many different files, so
the compiler might get confused by multiple summary tags.

Personally I think that's easy enough to resolve by simply taking the
last summary tag found, and ignoring all others while emitting a
warning. It's the programmer's responsibility to only use one tag.


I think a potentially bigger problem is that namespaces don't really
exist in .NET except as a logical entity. As far as the framework is
concerned, each class has a unique name and it's simply a matter of
convenience that some portion at the beginning happens to match that of
other classes.

Note that the classes don't even need to reside in the same assembly to
be members of the same namespace.

--
mikeb
Nov 16 '05 #6
Colin Young wrote:
Actually, you can document namespaces already, but it needs to be done in an
external file IIRC. I don't remember if the MS tools can use it, or if you
need to use NDoc. If you do a bit of a search, you should be able to find
some information about it. Unfortunately the project where I used it was 2
computers ago and I don't seem to have put my build scripts and the
namespace documentation into source control.

If I find more info, I'll post it to this thread.
I did a quick look, and indeed NDoc has an option
(UseNamespaceDocSummaries) that allows you to provide XML documentation
for namespaces by including the doc comments for a class named
"NamespaceDoc" in documentation.

The class is required because the C# compiler will only generate XML doc
output for types and members.

Colin

"Jon Davis" <jo*@REMOVE.ME.jondavis.net> wrote in message
news:eg**************@TK2MSFTNGP12.phx.gbl...
Namespaces don't have <summary> documentation (do they?), and I think it
would be nice to have it. For instance,

/// <summary>
/// Classes containing math functions.
/// </summary>
namespace BillyBob.Math {
...
}

Now if you had more than one <summary> compiled with a namespace, such as
having two class files each with a different <summary> for its otherwise
identical namespace, then the consumer could be able to cycle through the
different summary descriptions... it should be an array of descriptions.

Might be a little messy I suppose, but it's better than no descriptions at
all.

Sometimes people deliver things in the strangest namespaces ...

Jon


--
mikeb
Nov 16 '05 #7
On Wed, 19 May 2004 13:57:38 -0700, mikeb
<ma************@nospam.mailnull.com> wrote:
I think a potentially bigger problem is that namespaces don't really
exist in .NET except as a logical entity. As far as the framework is
concerned, each class has a unique name and it's simply a matter of
convenience that some portion at the beginning happens to match that of
other classes.


True, but the assembly structure isn't really relevant here since XML
documentation isn't stored with the assemblies anyway. I don't expect
the IDE to associate namespace comments with assemblies or anything;
the compiler should just output them into its XML documentation
whenever it comes across them, so that they can be used by some
external tool like NDoc to build the class reference.
--
http://www.kynosarges.de
Nov 16 '05 #8
Colin,

The documentation advantage I was seeking was in having a description of the
namespaces while paging through the intellisense menus. It should be
integrated in the assembly.

Jon
"Colin Young" <x@nospam.com> wrote in message
news:Ot*************@TK2MSFTNGP10.phx.gbl...
Actually, you can document namespaces already, but it needs to be done in an external file IIRC. I don't remember if the MS tools can use it, or if you
need to use NDoc. If you do a bit of a search, you should be able to find
some information about it. Unfortunately the project where I used it was 2
computers ago and I don't seem to have put my build scripts and the
namespace documentation into source control.

If I find more info, I'll post it to this thread.

Colin

"Jon Davis" <jo*@REMOVE.ME.jondavis.net> wrote in message
news:eg**************@TK2MSFTNGP12.phx.gbl...
Namespaces don't have <summary> documentation (do they?), and I think it
would be nice to have it. For instance,

/// <summary>
/// Classes containing math functions.
/// </summary>
namespace BillyBob.Math {
...
}

Now if you had more than one <summary> compiled with a namespace, such as having two class files each with a different <summary> for its otherwise
identical namespace, then the consumer could be able to cycle through the different summary descriptions... it should be an array of descriptions.

Might be a little messy I suppose, but it's better than no descriptions at all.

Sometimes people deliver things in the strangest namespaces ...

Jon


Nov 16 '05 #9
That actually would be useful (although less useful than sensibly named
namespaces). Probably best to submit that through the product suggestion
page:

http://register.microsoft.com/mswish/suggestion.asp

You could also hope that one of the developers sees the message here.

Colin

"Jon Davis" <jo*@REMOVE.ME.jondavis.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Colin,

The documentation advantage I was seeking was in having a description of the namespaces while paging through the intellisense menus. It should be
integrated in the assembly.

Jon
"Colin Young" <x@nospam.com> wrote in message
news:Ot*************@TK2MSFTNGP10.phx.gbl...
Actually, you can document namespaces already, but it needs to be done in
an
external file IIRC. I don't remember if the MS tools can use it, or if you need to use NDoc. If you do a bit of a search, you should be able to find some information about it. Unfortunately the project where I used it was 2 computers ago and I don't seem to have put my build scripts and the
namespace documentation into source control.

If I find more info, I'll post it to this thread.

Colin

"Jon Davis" <jo*@REMOVE.ME.jondavis.net> wrote in message
news:eg**************@TK2MSFTNGP12.phx.gbl...
Namespaces don't have <summary> documentation (do they?), and I think it would be nice to have it. For instance,

/// <summary>
/// Classes containing math functions.
/// </summary>
namespace BillyBob.Math {
...
}

Now if you had more than one <summary> compiled with a namespace, such
as having two class files each with a different <summary> for its otherwise identical namespace, then the consumer could be able to cycle through the different summary descriptions... it should be an array of descriptions.
Might be a little messy I suppose, but it's better than no
descriptions at all.

Sometimes people deliver things in the strangest namespaces ...

Jon



Nov 16 '05 #10
Christoph Nahr wrote:
On Wed, 19 May 2004 13:57:38 -0700, mikeb
<ma************@nospam.mailnull.com> wrote:

I think a potentially bigger problem is that namespaces don't really
exist in .NET except as a logical entity. As far as the framework is
concerned, each class has a unique name and it's simply a matter of
convenience that some portion at the beginning happens to match that of
other classes.

True, but the assembly structure isn't really relevant here since XML
documentation isn't stored with the assemblies anyway. I don't expect
the IDE to associate namespace comments with assemblies or anything;
the compiler should just output them into its XML documentation
whenever it comes across them, so that they can be used by some
external tool like NDoc to build the class reference.


My use of the word 'problem' is too strong. It's really just something
to be aware of for whoever might implement or use XML doc tags for
namespaces. There's a fair amount of confusion out there (particularly
with people new to .NET) that namespaces are something more than they
are - for example, that they're tied to an assembly or that they have
something to do with the class hierarchy.

Note that at times, the XML docs are used on an assembly basis; VS.NET's
Intellisense picks up information from an appropriately named XML file
when an assembly is referenced for some of the information it displays.

--
mikeb
Nov 16 '05 #11

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

Similar topics

6
by: Mikko Nummelin | last post by:
As the XSLT namespace is declared to be used in XSL documents like this: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> , isn't this a risky practice as it...
0
by: John Resler | last post by:
I am receiving the following validation error in the latest version of XMLSpy : This file is not valid: The complex type of element 'wx:Identifier' does not allow attribute 'ICAO_ID' and no...
2
by: dimension | last post by:
Hi, in visual studio 2005 beta, when i type "using System.Web." no code complete helper pops up. Similarly, when typing "using System.Net." i do not see an HttpWebRequest in the list that pops...
3
by: Edward Diener | last post by:
In the explanation to the ToolboxBitmapAttribute it is mentioned that new bitmaps added to an assembly by Visual Studio .NET get the name of the default namespace prepened to the name of the...
161
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
12
by: Plop69 | last post by:
need some help on following: xml file 1 <TEST xmlns="http://test" > <OK>mlkddflmkj</OK> </TEST>
30
by: Pep | last post by:
Is it best to include the code "using namespace std;" in the source or should each keyword in the std namespace be qualified by the namespace tag, such as std::cout << "using std namespace" <<...
2
by: Lloyd Dupont | last post by:
How do you XML document namespace? I'm tetsing my project documentation with NDoc. And I could see I have no namspace documentation. How do I fix that?
1
by: leno | last post by:
Hi all, I'm having this problem when i combined multiple schema's into one. The error msg is below: Unable to load schema with target namespace 'http://www.tdbanknorth.com/IFX170_TDBN' from...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.