Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Found some issues in C# doc generation and decided to fix it.
Number 4. of changes list fixes #181.
Changes
1. Fix "returns" insertion
1.1 Method returning void
Not insert if void. Currently checks for first child in
ret.return_statement, but it's not enough, because it modifiers likepublic,staticetc can be put before return type.before:
after:
1.2 Constructor
Not insert at all. Currently inserts every time.
before:
after:
1.3 Indexer
Change logic from search for return statement to checking if getter is present, because
getmight not contain return statement, but instead=>, also might not contain body at all in interfaces.before:
after:
2. Fix parameter generation when attribute is attached to it
Currently gets 2-nd position of children in parameter. Changed it to take last child instead.
before:
after:
3. Added support for primary constructors
before:
after:
4. Added support for records, record structs, structs
Same logic as for classes is applied.
5. Change parameters and type parameters order for xmldoc (type parameters should go first)
before:
after: