简体   繁体   中英

Doxygen not generating documentation for internal C# functions

I developed a Registry function "class" for Ketarin, and I'm using Doxygen for Windows to doc it.

When I build the documentation (using Doxywizard) following the tutorial on: http://www.tech-coder.com/2016/12/generate-html-documentation-using.html

It docs only the two first functions and nothing else. I tried to check all boxes on the "Build" column at the "Expert" tab but no avail.

The code (including the documentation - that only show 2 functions) can be found on GitHub at https://github.com/coldscientist/RegClassCS

For example, the internal method below is showed normally on docs:

/// <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;
    });

But the following method (below that one) is not documented:

/// <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;
    });

I'm suspecting that it is related to the way I coded it (the code compiles normally). Maybe there is a comma missing or some code formatting that is making Doxygen missing itself.

Here is the Doxygen output, if it helps:

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

I give up and migrate to Natural Docs . But I notice that after the internal functions that were not printed before by Doxygen, it showed up internal methods that doesn't exist on my code (but apparently it is obtained by internal methods args - see RegSetValue below). If I remove "RegCreateKey", the method below that ("string") is removed too (obviously). Maybe in Doxygen is happening the same thing, but instead of continue, it stop processing the file (I'm not sure of it). I'm just posting it to help other people and Doxygen to (maybe) check this on the future.

On Natural Docs, I can hide these undesired internal methods (that, in fact, doesn't exist) using the arg -do when building docs, so it shows up only documented internal methods.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM