WPF的Doxygen文档 [英] Doxygen Documentation for WPF

查看:172
本文介绍了WPF的Doxygen文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在为我的C#代码创建文档。我做了很多普通的源代码,并设置了doxygen来创建HTML。最后我到达了在WPF中完成的UI,所以这两个XAML和源代码。现在我的问题是,记录这些文件的最好方法是什么?评论可能在XAML,但不是有用的,因为它们不能嵌套。另外我不知道Doxygen是否可以处理XAML文档。所有这些都应该记录在xaml.cs文件中?

解决方案

我发现了一个或多或少的好解决方案。首先,您必须将文件扩展名添加到 FILE_PATTERNS ,所以* .xaml在我的情况。 Doxygen使用扩展来确定要使用的解析器。我猜默认是C.接下来你添加如下文档:

 <! - > 
/ ** \file
* \brief简要文件说明。
*
*更详细的文件描述。
* / - >

< ! - - > 是xaml文件的注释部分。当Doxygen解析文件时,它会删除文档而不添加它。这就是为什么有一个> 来愚弄Doxygen解析器,注释已经完成了。我知道这是丑陋的,但最糟糕的是,我的描述在文档中丢失,但仍然可以在文件中。所以只要没有更好的做法,我会坚持下去。


I am currently in the process of creating a documentation for my C# code. I've done a lot of ordinary source code and set up doxygen to create HTML out of it. Finally I arrived at the UI which is done in WPF, so both XAML and source code. Now my question is, what is the best way to document these files? Comments are possible in XAML but not that useful as they cannot be nested. Also I don't know if Doxygen can possibly handle XAML documentation. So should everything be documented in the xaml.cs files?

解决方案

I found a more or less good solution. At first, you have to add the file extension to FILE_PATTERNS, so *.xaml in my case. Doxygen uses the extension to determine what parser to use. I guess the default is C. Next you add your documentation like this:

<!-->
/** \file
* \brief A brief file description.
* 
* A more elaborated file description.
*/ -->

The < !-- and --> are the comment section for xaml files. When Doxygen parses the file it removes the documentation without adding it. That's why there is a > to fool the Doxygen parser that the comment is already finished. I know this is ugly but the worst that can happen is that my descriptions are lost in the documentation but still available in the files. So as long as there is no better way of doing it I will stick with this.

这篇关于WPF的Doxygen文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆