vscode-docomment icon indicating copy to clipboard operation
vscode-docomment copied to clipboard

Adding Method Summary

Open chrisjohnson2134 opened this issue 4 years ago • 3 comments

I was wondering how I could go about adding a method summary to this code that would list all the methods in a class? ''' /// summary> /// Class of Pugs /// /summary> /// method name="bark"> /// method name="sniff"> public class pugs{ public pugs(string name){ } public void bark(string sound){ } public void sniff(){ } } '''

chrisjohnson2134 avatar May 19 '20 23:05 chrisjohnson2134

Hello @chrisjohnson2134 , that feature seems to be useful. Do you know the reference point where the specifications for <method name=> tag for Documentation comments are written?

  • Standard ECMA-334, C# Language Specification, 5th edition (December 2017), p.477 , https://www.ecma-international.org/publications/standards/Ecma-334.htm
Standard ECMA-334, C# Language Specification, 5th edition (December 2017), p 477

kasecato avatar May 20 '20 01:05 kasecato

I want to thank you for reaching out, I was unaware that the 'method' wasn't a tag. However I still do want to implement the list of methods to summarize the class, would it make sense to make a list in the summary? I'm assuming not because it would mess up the scheme. Would it make more sense to allow the XML comment to be made and then a sub-header of the method names, like so?

''' /// summary> /// Class of Pugs /// /summary> /* Constructors *-> Constructor - params (name) # (short description) *Public Methods *-> bark - params (sound) # (short description) *-> sniff # (short description) */ public class pugs{ public pugs(string name){ } public void bark(string sound){ } public void sniff(){ } } '''

chrisjohnson2134 avatar May 20 '20 02:05 chrisjohnson2134

So that's what you meant. I think that's a good idea. If it's standardized, I'd love to implement it 👍

kasecato avatar May 20 '20 05:05 kasecato