-2

我为 Ketarin 开发了一个注册表函数“类”,我正在使用 Doxygen for Windows 来记录它。

当我按照以下教程构建文档(使用 Doxywizard)时:http ://www.tech-coder.com/2016/12/generate-html-documentation-using.html

它只记录了前两个函数,没有别的。我试图在“专家”选项卡的“构建”列上选中所有框,但无济于事。

可以在 GitHub 上的https://github.com/coldscientist/RegClassCS找到代码(包括文档 - 仅显示 2 个函数)

例如,下面的内部方法在文档上正常显示:

/// <summary>
/// Creates a new subkey or opens an existing subkey for write access.
/// </summary>
/// <param name="rootName">The HKEY to open.</param>
/// <param name="keyName">The name or path of the subkey to create or open. This string is not case-sensitive.</param>
/// <returns>The newly created subkey, or false if the operation failed. If a zero-length string is specified for subkey, the current RegistryKey object is returned.</returns>
Func<string, string, bool> RegCreateKey = new Func<string, string, bool>( (rootName, keyName) =>
    {
        try
        {
            Ketarin.Forms.LogDialog.Log("RegCreateKey(" + rootName + ", " + keyName + ")");

            Microsoft.Win32.RegistryKey localKey = RegOpenSubKey(rootName);
            // localKey = localKey.OpenSubKey(keyName, writable: true);

            using (localKey)
            {
                RegCreateKey:
                if (localKey != null)
                {
                    localKey.CreateSubKey( keyName );
                }
                else
                {
                    // Abort("Key " + rootName + @"\" + keyName + " not found.");

                    goto RegCreateKey;
                }
            }
        }
        catch (Exception ex)
        {
            // Abort(ex.ToString());
            return false;
        }

        return true;
    });

但是没有记录以下方法(低于该方法):

/// <summary>
/// Deletes a subkey and any child subkeys recursively. No warning will be provided.
/// </summary>
/// <param name="rootName">The HKEY to open.</param>
/// <param name="subKeyName">The subkey to delete. This string is not case-sensitive.</param>
/// <returns>Returns false if the operation failed.</returns>
Func<string, string, bool> RegDeleteKey = new Func<string, string, bool>( (rootName, subKeyName) =>
    {
        try
        {
            Ketarin.Forms.LogDialog.Log("RegDeleteKey(" + rootName + ", " + subKeyName + ")");

            string keyName = subKeyName.Substring(0, subKeyName.LastIndexOf(@"\"));
            string subTreeName = subKeyName.Substring(subKeyName.LastIndexOf(@"\")+1);

            Microsoft.Win32.RegistryKey localKey = RegOpenSubKey(rootName);
            localKey = localKey.OpenSubKey(keyName, writable: true);

            using (localKey)
            {
                if (localKey != null)
                {
                    localKey.DeleteSubKeyTree(subTreeName);
                }
            }
        }
        catch (Exception ex)
        {
            return false;
            // Abort(ex.ToString());
        }

        return true;
    });

我怀疑它与我编码它的方式有关(代码编译正常)。也许缺少逗号或某些代码格式导致 Doxygen 丢失。

这是 Doxygen 的输出,如果有帮助的话:

Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for dia files...
Searching for files to exclude
Searching INPUT for files to process...
Searching for files in directory S:/Applications/Scripts/RegClassCS
Searching for files in directory S:/Applications/Scripts/RegClassCS/doc
Reading and parsing tag files
Parsing files
Reading S:/Applications/Scripts/RegClassCS/README.md...
Preprocessing S:/Applications/Scripts/RegClassCS/RegClass.cs...
Parsing file S:/Applications/Scripts/RegClassCS/RegClass.cs...
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Associating documentation with classes...
Computing nesting relations for classes...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building interface member list...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Creating members for template instances...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Freeing entry tree
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Sorting member lists...
Computing dependencies between directories...
Generating citations page...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Generating style sheet...
Generating search indices...
Generating example documentation...
Generating file sources...
Generating file documentation...
Generating docs for file README.md...
Generating docs for file RegClass.cs...
Generating page documentation...
Generating docs for page md_README...
Generating group documentation...
Generating class documentation...
Generating namespace index...
Generating graph info page...
Generating directory documentation...
Generating index page...
Generating page index...
Generating module index...
Generating namespace index...
Generating namespace member index...
Generating annotated compound index...
Generating alphabetical compound index...
Generating hierarchical class index...
Generating member index...
Generating file index...
Generating file member index...
Generating example index...
finalizing index lists...
writing tag file...
lookup cache used 2/65536 hits=2 misses=2
finished...
S:/Applications/Scripts/RegClassCS/README.md:3: warning: Unexpected html tag  found within  context
*** Doxygen has finished
4

1 回答 1

2

我放弃并迁移到Natural Docs。但我注意到,在 Doxygen 之前未打印的内部函数之后,它显示了我的代码中不存在的内部方法(但显然它是通过内部方法 args 获得的 - 请参见下面的 RegSetValue)。如果我删除“RegCreateKey”,那么下面的方法(“string”)也会被删除(显然)。也许在 Doxygen 中发生了同样的事情,但它不是继续,而是停止处理文件(我不确定)。我只是发布它来帮助其他人和 Doxygen(也许)在未来检查这个。

在 Natural Docs 上,我可以在构建文档时使用 arg 隐藏这些不需要的内部方法(实际上不存在)-do,因此它只显示记录的内部方法。

在此处输入图像描述

于 2017-12-28T21:03:00.857 回答