0

How do we generate the ITokenBuilder class/interface in C# that has all the necessary tags and stuff like in the code snippet below:

 /// <summary>
 ///  Initializes a new instance of the <see cref="Token"/> class.
 /// </summary>
 /// <param name="builder">Token builder</param>
 protected Token(ITokenBuilder builder)
 {
     Lexeme = builder.Lexeme;
     LeftTrivia = builder.LeftTrivia;
     RightTrivia = builder.RightTrivia;
 }

Do I need to manually type in the /// <summary> stuff?

Quince Ngomane
  • 340
  • 1
  • 3
  • 16
  • What do you mean by "the necessary tags"? They're documentation snippets. – ProgrammingLlama Jul 30 '21 at 07:35
  • What I am trying to say is: Do I have to create an empty class/interface and then manually type in `/// /// Initializes a new instance of the class. /// /// Token builder ` – Quince Ngomane Jul 30 '21 at 07:38
  • You can create a template https://learn.microsoft.com/en-us/visualstudio/ide/how-to-create-item-templates?view=vs-2019 – Bizhan Jul 30 '21 at 07:40
  • Watch this video for advanced templates https://www.youtube.com/watch?v=3uYN3mDFP-o – Bizhan Jul 30 '21 at 07:41
  • I will try to create the template then I will let you know how it goes – Quince Ngomane Jul 30 '21 at 07:41
  • 1
    Type [///](https://stackoverflow.com/a/34587325/1997232) and use [other tags](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags) to add documentation to `public` members. I wouldn't bother with documenting anything else (e.g. `protected`, unless it's a library and implementing abstract members is required), just give them good self-explanatory names. – Sinatr Jul 30 '21 at 07:53
  • So I added the `///` and it worked. It auto filled the summary and params tags for me. Thanks – Quince Ngomane Aug 02 '21 at 06:42

0 Answers0