Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c#: Inherit documentation from interface property (not working as no docs displayed) #8898

Open
TheMiller2015 opened this issue Nov 18, 2021 · 6 comments
Labels

Comments

@TheMiller2015
Copy link

TheMiller2015 commented Nov 18, 2021

Describe the bug
In the same assembly, I have a public interface containing properties and methods. Everything is documented. The implementing public class has the same properties and methods (of course) and intelliSense shows the docs from the interface of methods and properties. The generated docs (of the implementing class) only contain the docs of the methods, but not of the properties. These docs are completely empty. It also doesn't matter, if I use <inheritdoc /> or not.

Expected behavior
The documentation text from the properties of the interface should also be copied to the implementing class properties.

To Reproduce

public interface IAnimal
{
    /// <summary>
    /// This doc-comment is NOT being copied over to "Cat"
    /// </summary>
    public string Name { get; set; }
    
    /// <summary>
    /// This doc-comment is being copied over to "Cat"
    /// </summary>
    public void Reset();
}

public class Cat: IAnimal
{
    public string Name { get; set; }
    
    public void Reset();
}

Version
Windows 10, 64 bit,
doxygen 1.9.2

Thanks in advance for helping me. Let me know, if I can do anything to solve this problem.

@albert-github albert-github added C# needinfo reported bug is incomplete, please add additional info labels Nov 18, 2021
@albert-github
Copy link
Collaborator

Looks like a C# problem.

  • Please provide the content of the doxygen settings file that differ from the default settings (doxygen -x Doxyfile)
  • Please indicate (in an image) where you see that something is missing, including the name of the html file this is in.

@TheMiller2015
Copy link
Author

Thanks for the quick response. Here are the differences (but I noticed, not all were listed by using your command. Some labels in the gui are red, but not listed, I'll append them though.)

Difference with default Doxyfile 1.9.2 (caa4e3d)

PROJECT_NAME = xxx
OUTPUT_DIRECTORY = C:\Users\xxx\Documents\development_documentations\xxx\xxxx
OPTIMIZE_OUTPUT_JAVA = YES
EXTRACT_ALL = YES
INPUT = C:\development\xxx\c-sharp\xxxx
RECURSIVE = YES

red colored labels are:
SHOW_INCLUDE_FILES (unchecked)
SORT_MEMBER_DOCS (unchecked)
INLINE_INHERITED_MEMB (checked|unchecked) but makes no difference regarding the not copied docs

The html filename is like:
html/classx_x_x_xxx_1_1_interfaces_1_1_cat.html

The missing parts:
doxygen

The code file:
doxygen2

Does that help? Thanks

@albert-github
Copy link
Collaborator

As you are using the doxywizard the doxygen -x Doxyfile is maybe a bit cumbersome but on the run tab there is a check box Condensed and a button show configuration giving the same information as doxygen -x Doxyfile

image

@TheMiller2015
Copy link
Author

TheMiller2015 commented Nov 18, 2021

Okay thanks. So here is the output from doxywizard:

# Doxyfile 1.9.2

PROJECT_NAME           = myproject.Lib
OUTPUT_DIRECTORY       = C:\Users\xxx\Documents\development_documentations\xxx\myproject.Lib
INLINE_INHERITED_MEMB  = YES
OPTIMIZE_OUTPUT_JAVA   = YES
EXTRACT_ALL            = YES
SHOW_INCLUDE_FILES     = NO
SORT_MEMBER_DOCS       = NO
INPUT                  = C:\development\xxxx\c-sharp\myproject
RECURSIVE              = YES
GENERATE_TREEVIEW      = YES
FULL_SIDEBAR           = YES
GENERATE_LATEX         = NO

albert-github added a commit to albert-github/doxygen that referenced this issue Nov 21, 2021
…(not working as no docs displayed)

See to it that the documentation of a C# property is copied as well.
@albert-github albert-github added bug and removed needinfo reported bug is incomplete, please add additional info labels Nov 21, 2021
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #8904

doxygen added a commit that referenced this issue Dec 22, 2021
issue #8898 c#: Inherit documentation from interface property (not working as no docs displayed)
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants