RequestSizeLimitAttribute 类

定义

将请求正文大小限制设置为指定大小。

public ref class RequestSizeLimitAttribute : Attribute, Microsoft::AspNetCore::Mvc::Filters::IFilterFactory, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class RequestSizeLimitAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class RequestSizeLimitAttribute : Attribute, Microsoft.AspNetCore.Http.Metadata.IRequestSizeLimitMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type RequestSizeLimitAttribute = class
    inherit Attribute
    interface IFilterFactory
    interface IFilterMetadata
    interface IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type RequestSizeLimitAttribute = class
    inherit Attribute
    interface IFilterFactory
    interface IFilterMetadata
    interface IOrderedFilter
    interface IRequestSizeLimitMetadata
Public Class RequestSizeLimitAttribute
Inherits Attribute
Implements IFilterFactory, IOrderedFilter
Public Class RequestSizeLimitAttribute
Inherits Attribute
Implements IFilterFactory, IOrderedFilter, IRequestSizeLimitMetadata
继承
RequestSizeLimitAttribute
属性
实现

构造函数

RequestSizeLimitAttribute(Int64)

创建 RequestSizeLimitAttribute 的新实例。

属性

IsReusable

获取一个值,该值指示是否可以在请求之间重复使用结果 CreateInstance(IServiceProvider)

Order

获取用于确定筛选器执行顺序的顺序值。 筛选器以属性的 Order 升序数值执行。

方法

CreateInstance(IServiceProvider)

创建可执行筛选器的实例。

显式接口实现

IRequestSizeLimitMetadata.MaxRequestBodySize

当前请求正文的最大允许大小(以字节为单位)。

适用于