Search code examples
c#xml-documentationcode-documentationghostdoc

GhostDoc how to get attributes of a property?


I use the aforesaid documentation tool on Visual Studio 2017.

I can reach the GhostDoc Options > Rules > Property Template and customize the code. I have a property like;

[Display(Name="Text here")]
[Required]
public int CompanyId {get;set;}

I want to reach the "Required" and "DisplayName" attributes and use them in summary. Is there any way to accomplish it?

Thank you.


Solution

  • Please see https://support.submain.com/community/a75/how-to-reference-an-attribute-on-a-method-or-property.aspx for information on how to use the attribute names in the template. The attribute values are not available ATM but are coming soon.