【发布时间】:2013-02-27 20:33:12
【问题描述】:
在具有单个构造函数的 C# 类中,我可以添加类摘要 XML 文档和构造函数 XML 文档:
///<summary>
///This class will solve all your problems
///</summary>
public class Awesome
{
/// <summary>
/// Initializes a new instance of the <see cref="Awesome"/> class.
/// </summary>
/// <param name="sauce">The secret sauce.</param>
public Awesome(string sauce)
{
//...implementation elided for security purposes
}
}
如何对等效的 F# 类执行相同操作,以使生成的文档相同?
type Awesome(sauce: string) =
//...implementation elided for security purposes
澄清:我知道标准 XML 文档标签可以在 F# 中使用。我的问题是如何将它们添加到上面的 sn-p 中,以便记录类型和构造函数。
【问题讨论】:
-
+1 好收获。我认为没有办法做到这一点:-(
标签: f# xml-documentation