ProducesResponseTypeAttribute<T> 类

定义

一个筛选器,指定操作返回的值和状态代码的类型。

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>

构造函数

ProducesResponseTypeAttribute<T>(Int32)

初始化 ProducesResponseTypeAttribute 的实例。

ProducesResponseTypeAttribute<T>(Int32, String, String[])

初始化 ProducesResponseTypeAttribute 的实例。

属性

StatusCode

获取或设置响应的 HTTP 状态代码。

(继承自 ProducesResponseTypeAttribute)
Type

获取或设置操作返回的值的类型。

(继承自 ProducesResponseTypeAttribute)

显式接口实现

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

配置可由操作生成的允许内容类型的集合。

(继承自 ProducesResponseTypeAttribute)

适用于