UnsupportedContentTypeFilter 类

定义

一个筛选器,用于扫描 UnsupportedContentTypeException 中的 ModelState ,并使用不支持的媒体类型 (415) 响应使管道短路。

public ref class UnsupportedContentTypeFilter : Microsoft::AspNetCore::Mvc::Filters::IActionFilter
public ref class UnsupportedContentTypeFilter : Microsoft::AspNetCore::Mvc::Filters::IActionFilter, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
public class UnsupportedContentTypeFilter : Microsoft.AspNetCore.Mvc.Filters.IActionFilter
public class UnsupportedContentTypeFilter : Microsoft.AspNetCore.Mvc.Filters.IActionFilter, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
type UnsupportedContentTypeFilter = class
    interface IActionFilter
    interface IFilterMetadata
type UnsupportedContentTypeFilter = class
    interface IActionFilter
    interface IFilterMetadata
    interface IOrderedFilter
Public Class UnsupportedContentTypeFilter
Implements IActionFilter
Public Class UnsupportedContentTypeFilter
Implements IActionFilter, IOrderedFilter
继承
UnsupportedContentTypeFilter
实现

构造函数

UnsupportedContentTypeFilter()

一个筛选器,用于扫描 UnsupportedContentTypeException 中的 ModelState ,并使用不支持的媒体类型 (415) 响应使管道短路。

属性

Order

获取或设置筛选顺序。 Order.

默认为 以确保 -3000 它在 之前 ModelStateInvalidFilter执行。

方法

OnActionExecuted(ActionExecutedContext)

在操作执行后、操作结果之前调用。

OnActionExecuting(ActionExecutingContext)

在操作执行之前调用,在模型绑定完成后调用。

适用于