Table of Contents

Class DisableModelBindingAttribute

Namespace
Cuemon.AspNetCore.Mvc.Filters.ModelBinding
Assembly
Cuemon.AspNetCore.Mvc.dll

Provides a generic way to disable Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory implementations used for model binding.

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
public class DisableModelBindingAttribute : Attribute, IAsyncResourceFilter, IFilterMetadata
Inheritance
Object
Attribute
DisableModelBindingAttribute
Implements
IAsyncResourceFilter
IFilterMetadata
Inherited Members
Attribute.Equals(Object)
Attribute.GetCustomAttribute(Assembly, Type)
Attribute.GetCustomAttribute(Assembly, Type, Boolean)
Attribute.GetCustomAttribute(MemberInfo, Type)
Attribute.GetCustomAttribute(MemberInfo, Type, Boolean)
Attribute.GetCustomAttribute(Module, Type)
Attribute.GetCustomAttribute(Module, Type, Boolean)
Attribute.GetCustomAttribute(ParameterInfo, Type)
Attribute.GetCustomAttribute(ParameterInfo, Type, Boolean)
Attribute.GetCustomAttributes(Assembly)
Attribute.GetCustomAttributes(Assembly, Boolean)
Attribute.GetCustomAttributes(Assembly, Type)
Attribute.GetCustomAttributes(Assembly, Type, Boolean)
Attribute.GetCustomAttributes(MemberInfo)
Attribute.GetCustomAttributes(MemberInfo, Boolean)
Attribute.GetCustomAttributes(MemberInfo, Type)
Attribute.GetCustomAttributes(MemberInfo, Type, Boolean)
Attribute.GetCustomAttributes(Module)
Attribute.GetCustomAttributes(Module, Boolean)
Attribute.GetCustomAttributes(Module, Type)
Attribute.GetCustomAttributes(Module, Type, Boolean)
Attribute.GetCustomAttributes(ParameterInfo)
Attribute.GetCustomAttributes(ParameterInfo, Boolean)
Attribute.GetCustomAttributes(ParameterInfo, Type)
Attribute.GetCustomAttributes(ParameterInfo, Type, Boolean)
Attribute.GetHashCode()
Attribute.IsDefaultAttribute()
Attribute.IsDefined(Assembly, Type)
Attribute.IsDefined(Assembly, Type, Boolean)
Attribute.IsDefined(MemberInfo, Type)
Attribute.IsDefined(MemberInfo, Type, Boolean)
Attribute.IsDefined(Module, Type)
Attribute.IsDefined(Module, Type, Boolean)
Attribute.IsDefined(ParameterInfo, Type)
Attribute.IsDefined(ParameterInfo, Type, Boolean)
Attribute.Match(Object)
Attribute.TypeId

Remarks

Constructors

DisableModelBindingAttribute(Type)

Initializes a new instance of the DisableModelBindingAttribute class.

public DisableModelBindingAttribute(Type valueProviderFactoryType)

Parameters

valueProviderFactoryType Type

The type that needs to be disabled on class or method level.

Exceptions

System.ArgumentNullException

valueProviderFactoryType cannot be null.

System.NotSupportedException

Only a type that implements the Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory interface is supported.

Properties

ValueProviderFactoryType

Gets the type that needs to be disabled on class or method level.

public Type ValueProviderFactoryType { get; }

Property Value

Type

The type that needs to be disabled on class or method level.

Methods

OnResourceExecutionAsync(ResourceExecutingContext, ResourceExecutionDelegate)

Called asynchronously before the rest of the pipeline.

public Task OnResourceExecutionAsync(ResourceExecutingContext context, ResourceExecutionDelegate next)

Parameters

context ResourceExecutingContext

The Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext.

next ResourceExecutionDelegate

The Microsoft.AspNetCore.Mvc.Filters.ResourceExecutionDelegate. Invoked to execute the next resource filter or the remainder of the pipeline.

Returns

Task

A System.Threading.Tasks.Task which will complete when the remainder of the pipeline completes.

See Also

Attribute