ProducesResponseTypeAttribute<T> 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
一个筛选器,指定操作返回的值和状态代码的类型。
public class ProducesResponseTypeAttribute<T> : Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute
type ProducesResponseTypeAttribute<'T> = class
inherit ProducesResponseTypeAttribute
Public Class ProducesResponseTypeAttribute(Of T)
Inherits ProducesResponseTypeAttribute
类型参数
- T
Type将在响应中写入的 对象的 。
- 继承
构造函数
ProducesResponseTypeAttribute<T>(Int32, String, String[]) |
初始化 ProducesResponseTypeAttribute 的实例。 |
ProducesResponseTypeAttribute<T>(Int32) |
初始化 ProducesResponseTypeAttribute 的实例。 |
属性
StatusCode |
获取或设置响应的 HTTP 状态代码。 (继承自 ProducesResponseTypeAttribute) |
Type |
获取或设置操作返回的值的类型。 (继承自 ProducesResponseTypeAttribute) |
显式接口实现
IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection) |
配置可由操作生成的允许内容类型的集合。 (继承自 ProducesResponseTypeAttribute) |