ConsumesAttribute 클래스

정의

지원되는 요청 콘텐츠 형식을 지정하는 필터입니다. ContentTypes 는 여러 일치 항목이 있을 때 작업을 선택하는 데 사용됩니다.

public ref class ConsumesAttribute : Attribute, Microsoft::AspNetCore::Mvc::ActionConstraints::IActionConstraint, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiRequestMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IResourceFilter, Microsoft::AspNetCore::Mvc::Internal::IConsumesActionConstraint
public ref class ConsumesAttribute : Attribute, Microsoft::AspNetCore::Mvc::ActionConstraints::IActionConstraint, Microsoft::AspNetCore::Mvc::ApiExplorer::IApiRequestMetadataProvider, Microsoft::AspNetCore::Mvc::Filters::IResourceFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ConsumesAttribute : Attribute, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Mvc.Internal.IConsumesActionConstraint
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ConsumesAttribute : Attribute, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ConsumesAttribute : Attribute, Microsoft.AspNetCore.Http.Metadata.IAcceptsMetadata, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ConsumesAttribute = class
    inherit Attribute
    interface IResourceFilter
    interface IFilterMetadata
    interface IConsumesActionConstraint
    interface IActionConstraint
    interface IActionConstraintMetadata
    interface IApiRequestMetadataProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ConsumesAttribute = class
    inherit Attribute
    interface IActionConstraint
    interface IActionConstraintMetadata
    interface IApiRequestMetadataProvider
    interface IFilterMetadata
    interface IResourceFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ConsumesAttribute = class
    inherit Attribute
    interface IResourceFilter
    interface IFilterMetadata
    interface IActionConstraint
    interface IActionConstraintMetadata
    interface IApiRequestMetadataProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type ConsumesAttribute = class
    inherit Attribute
    interface IResourceFilter
    interface IFilterMetadata
    interface IActionConstraint
    interface IActionConstraintMetadata
    interface IApiRequestMetadataProvider
    interface IAcceptsMetadata
Public Class ConsumesAttribute
Inherits Attribute
Implements IActionConstraint, IApiRequestMetadataProvider, IConsumesActionConstraint, IResourceFilter
Public Class ConsumesAttribute
Inherits Attribute
Implements IActionConstraint, IApiRequestMetadataProvider, IResourceFilter
Public Class ConsumesAttribute
Inherits Attribute
Implements IAcceptsMetadata, IActionConstraint, IApiRequestMetadataProvider, IResourceFilter
상속
ConsumesAttribute
특성
구현

생성자

ConsumesAttribute(String, String[])

ConsumesAttribute의 새 인스턴스를 만듭니다.

ConsumesAttribute(Type, String, String[])

ConsumesAttribute의 새 인스턴스를 만듭니다.

필드

ConsumesActionConstraintOrder

에 대한 순서는 특성을 사용합니다.

속성

ContentTypes

지원되는 요청 콘텐츠 형식을 가져오거나 설정합니다. 여러 일치 항목이 있는 경우 작업을 선택하는 데 사용됩니다.

IsOptional

요청 본문이 선택 사항인지 여부를 결정하는 값을 가져오거나 설정합니다. 이 값은 API 탐색기에서 요청 본문이 필요한지 지정하는 데만 사용됩니다.

메서드

Accept(ActionConstraintContext)

작업이 선택하기 위한 유효한 후보인지 여부를 결정합니다.

OnResourceExecuted(ResourceExecutedContext)

리소스 필터를 실행합니다. 파이프라인의 나머지 부분을 실행한 후 호출됩니다.

OnResourceExecuting(ResourceExecutingContext)

리소스 필터를 실행합니다. 파이프라인의 나머지를 실행하기 전에 호출됩니다.

SetContentTypes(MediaTypeCollection)

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

명시적 인터페이스 구현

IAcceptsMetadata.ContentTypes

지원되는 요청 콘텐츠 형식을 지정하는 필터입니다. ContentTypes 는 여러 일치 항목이 있을 때 작업을 선택하는 데 사용됩니다.

IAcceptsMetadata.RequestType

지원되는 요청 콘텐츠 형식을 지정하는 필터입니다. ContentTypes 는 여러 일치 항목이 있을 때 작업을 선택하는 데 사용됩니다.

IActionConstraint.Order

제약 조건 순서입니다.

적용 대상