是否可以为razor页面(组件)添加代码文档注释?
我发现可以使用标准的页面参数文档注释(这些参数在@code块中声明),但我仍在寻找一种为组件(类)本身添加注释的方法。
对于参数,可以使用以下方法:
@code
{
/// <summary> The Id of the selected account. </summary>
[Parameter]
public int SelectedAccount { get; set; }
}
因此,对于一个类,它应该是这样的:
@***
<summary> This component renders a table. </summary>
***@
或者
@classcomment{
<summary> This component renders a table. </summary>
}
有人知道方法吗?