UnsupportedContentTypeFilter 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
一个筛选器,用于扫描 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.
默认为 以确保 |
方法
OnActionExecuted(ActionExecutedContext) |
在操作执行后、操作结果之前调用。 |
OnActionExecuting(ActionExecutingContext) |
在操作执行之前调用,在模型绑定完成后调用。 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈