ModelBinderAttribute Класс

Определение

Атрибут, который может указать имя модели или тип , используемый для привязки IModelBinder .

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
Наследование
ModelBinderAttribute
Производный
Атрибуты
Реализации

Конструкторы

ModelBinderAttribute()

Инициализирует новый экземпляр ModelBinderAttribute.

ModelBinderAttribute(Type)

Инициализирует новый экземпляр ModelBinderAttribute.

Свойства

BinderType

Объект Type , реализующий либо IModelBinder.

BindingSource

Возвращает набор BindingSource.

Name

Имя модели.

Применяется к