Class DisableModelBindingAttribute
Provides a generic way to disable Microsoft.
Inheritance
Implements
Inherited Members
Namespace: Cuemon.AspNetCore.Mvc.Filters.ModelBinding
Assembly: Cuemon.AspNetCore.Mvc.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
public class DisableModelBindingAttribute : Attribute, IAsyncResourceFilter, IFilterMetadata
Remarks
This attribute was inspired by this source on GitHub: https://github.com/aspnet/Entropy/blob/rel/1.1.1/samples/Mvc.FileUpload/Filters/DisableFormValueModelBindingAttribute.cs.
Constructors
| Improve this DocDisableModelBindingAttribute(Type)
Initializes a new instance of the Disable
Declaration
public DisableModelBindingAttribute(Type valueProviderFactoryType)
Parameters
Type | Name | Description |
---|---|---|
System. |
valueProviderFactoryType | The type that needs to be disabled on class or method level. |
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
Only a type that implements the Microsoft. |
Properties
| Improve this DocValueProviderFactoryType
Gets the type that needs to be disabled on class or method level.
Declaration
public Type ValueProviderFactoryType { get; }
Property Value
Type | Description |
---|---|
System. |
The type that needs to be disabled on class or method level. |
Methods
| Improve this DocOnResourceExecutionAsync(ResourceExecutingContext, ResourceExecutionDelegate)
Called asynchronously before the rest of the pipeline.
Declaration
public Task OnResourceExecutionAsync(ResourceExecutingContext context, ResourceExecutionDelegate next)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
context | The Microsoft. |
Microsoft. |
next | The Microsoft. |
Returns
Type | Description |
---|---|
System. |
A System. |