2

我正在尝试为我的 Web API 项目使用自动生成文档。我有一个 ApplicationController 装饰有..

/// <param name="application">

这是 Application 类型并具有公共属性,例如..

[DataContract]
public class Application : ICanBeAuthenticated
{

    /// <summary>
    /// Email (string): Required. Email address of the applicant. Must be a valid email address.
    /// </summary>
    [DataMember(IsRequired = true)]
    public string Email { get; set; }

...

}

我可以检索电子邮件的摘要标签,但是我想访问属性名称“电子邮件”以将其与其描述分开,有什么想法吗?

理想情况下,我希望能够拥有类似..

    /// <name>
    /// Email (string)
    /// </name>
    /// <description>
    /// Required. Email address of the applicant. Must be a valid email address.
    /// </description>
    [DataMember(IsRequired = true)]
    public string Email { get; set; }
4

0 回答 0