ModelBinderAttribute Classe

Définition

Attribut qui peut spécifier un nom de modèle ou un type de IModelBinder à utiliser pour la liaison.

public ref class ModelBinderAttribute : Attribute, Microsoft::AspNetCore::Mvc::ModelBinding::IBinderTypeProviderMetadata, Microsoft::AspNetCore::Mvc::ModelBinding::IModelNameProvider
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=true)]
public class ModelBinderAttribute : Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=true)>]
type ModelBinderAttribute = class
    inherit Attribute
    interface IModelNameProvider
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=true)>]
type ModelBinderAttribute = class
    inherit Attribute
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IModelNameProvider
Public Class ModelBinderAttribute
Inherits Attribute
Implements IBinderTypeProviderMetadata, IModelNameProvider
Héritage
ModelBinderAttribute
Dérivé
Attributs
Implémente

Constructeurs

ModelBinderAttribute()

Initialise une nouvelle instance de ModelBinderAttribute.

ModelBinderAttribute(Type)

Initialise une nouvelle instance de ModelBinderAttribute.

Propriétés

BinderType

qui implémente l’un ou l’autre TypeIModelBinder.

BindingSource

Obtient BindingSource.

Name

Nom du modèle

S’applique à