ProducesAttribute 클래스

정의

작업이 반환할 예상 Type 및 지원되는 응답 콘텐츠 형식을 지정하는 필터입니다. 값은 ContentTypes 를 설정하는 ContentTypes데 사용됩니다.

public ref class ProducesAttribute : Microsoft::AspNetCore::Mvc::Filters::ResultFilterAttribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseMetadataProvider
public ref class ProducesAttribute : Attribute, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter, Microsoft::AspNetCore::Mvc::Filters::IResultFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ProducesAttribute : Microsoft.AspNetCore.Mvc.Filters.ResultFilterAttribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ProducesAttribute : Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesAttribute = class
    inherit ResultFilterAttribute
    interface IApiResponseMetadataProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesAttribute = class
    inherit ResultFilterAttribute
    interface IApiResponseMetadataProvider
    interface IFilterMetadata
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesAttribute = class
    inherit Attribute
    interface IResultFilter
    interface IFilterMetadata
    interface IOrderedFilter
    interface IApiResponseMetadataProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ProducesAttribute = class
    inherit Attribute
    interface IApiResponseMetadataProvider
    interface IFilterMetadata
    interface IOrderedFilter
    interface IResultFilter
Public Class ProducesAttribute
Inherits ResultFilterAttribute
Implements IApiResponseMetadataProvider
Public Class ProducesAttribute
Inherits Attribute
Implements IApiResponseMetadataProvider, IOrderedFilter, IResultFilter
상속
ProducesAttribute
상속
ProducesAttribute
파생
특성
구현

생성자

ProducesAttribute(String, String[])

허용된 콘텐츠 형식을 사용하여 의 ProducesAttribute instance 초기화합니다.

ProducesAttribute(Type)

ProducesAttribute의 인스턴스를 초기화합니다.

속성

ContentTypes

지원되는 응답 콘텐츠 형식을 가져오거나 설정합니다. 를 설정하는 ContentTypes데 사용됩니다.

Order

필터 실행 순서를 결정하는 순서 값을 가져옵니다. 필터는 속성의 오름차순 숫자 값으로 Order 실행됩니다.

Order

필터 실행 순서를 결정하는 순서 값을 가져옵니다. 필터는 속성의 오름차순 숫자 값으로 Order 실행됩니다.

(다음에서 상속됨 ResultFilterAttribute)
StatusCode

응답의 HTTP 상태 코드를 가져옵니다.

Type

작업의 낙관적 반환 형식을 가져옵니다.

메서드

OnResultExecuted(ResultExecutedContext)

작업 결과가 실행된 후 호출됩니다.

OnResultExecuted(ResultExecutedContext)

작업 결과가 실행된 후 호출됩니다.

(다음에서 상속됨 ResultFilterAttribute)
OnResultExecuting(ResultExecutingContext)

작업 결과가 실행되기 전에 호출됩니다.

OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate)

작업 결과 전에 비동기적으로 호출됩니다.

(다음에서 상속됨 ResultFilterAttribute)
SetContentTypes(MediaTypeCollection)

작업에서 생성할 수 있는 허용된 콘텐츠 형식의 컬렉션을 구성합니다.

적용 대상