ProducesDefaultResponseTypeAttribute Класс

Определение

Фильтр, указывающий Type для всех кодов состояния HTTP, не охватываемых ProducesResponseTypeAttribute.

public ref class ProducesDefaultResponseTypeAttribute sealed : Attribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiDefaultResponseMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class ProducesDefaultResponseTypeAttribute : Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDefaultResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesDefaultResponseTypeAttribute = class
    inherit Attribute
    interface IApiDefaultResponseMetadataProvider
    interface IApiResponseMetadataProvider
    interface IFilterMetadata
Public NotInheritable Class ProducesDefaultResponseTypeAttribute
Inherits Attribute
Implements IApiDefaultResponseMetadataProvider, IFilterMetadata
Наследование
ProducesDefaultResponseTypeAttribute
Атрибуты
Реализации

Конструкторы

ProducesDefaultResponseTypeAttribute()

Инициализирует экземпляр ProducesResponseTypeAttribute.

ProducesDefaultResponseTypeAttribute(Type)

Инициализирует экземпляр ProducesResponseTypeAttribute.

Свойства

StatusCode

Возвращает или задает код состояния HTTP ответа.

Type

Возвращает или задает тип значения, возвращаемого действием.

Явные реализации интерфейса

IApiResponseMetadataProvider.SetContentTypes(MediaTypeCollection)

Настраивает коллекцию разрешенных типов контента, которые могут быть созданы действием .

Применяется к