XML的文档命名空间 [英] XML-documentation for a namespace
问题描述
你写XML的文档的命名空间? ?如果是,如何以及在何处
Would you write xml-doc for a namespace? And if yes, how and where?
我会想,如果可能的话,也许是这样一个几乎空文件:
I would think, if it is possible, maybe an almost empty file like this:
/// <summary>
/// This namespace contains stuff
/// </summary>
namespace Some.Namespace
{
}
而将这项工作?既然你......申报,或至少使用的名称空间中的所有其他文件,以及...如果你写在同一个命名空间的XML的文档的事情在其他地方会发生什么?将一个来哪里去了?或者,他们会以某种方式合并?
But will that work? Since you... "declare", or at least use the namespace in all the other files as well... and what would happen if you wrote an xml-documentation thing somewhere else on the same namespace? Would one be gone? Or would they be merged somehow?
推荐答案
NDoc的承认一个特殊的 NamespaceDoc支持此
类位于每个命名空间,并使用从该文件。我还没有尝试过,但沙堡似乎支持同样的伎俩
NDoc supports this by recognising a special NamespaceDoc
class located in each namespace, and using the documentation from that. I haven't tried it, but Sandcastle appears to support the same trick.
编辑:
例如:
namespace Some.Namespace
{
/// <summary>
/// This namespace contains stuff
/// </summary>
public static class NamespaceDoc
{
}
}
这篇关于XML的文档命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!