BindPropertyAttribute Classe

Definição

Um atributo que pode especificar um nome de modelo ou tipo de IModelBinder a ser usado para associar a propriedade associada.

public ref class BindPropertyAttribute : Attribute, Microsoft::AspNetCore::Mvc::ModelBinding::IBinderTypeProviderMetadata, Microsoft::AspNetCore::Mvc::ModelBinding::IModelNameProvider, Microsoft::AspNetCore::Mvc::ModelBinding::IRequestPredicateProvider
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public class BindPropertyAttribute : Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IRequestPredicateProvider
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type BindPropertyAttribute = class
    inherit Attribute
    interface IModelNameProvider
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IRequestPredicateProvider
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type BindPropertyAttribute = class
    inherit Attribute
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IModelNameProvider
    interface IRequestPredicateProvider
Public Class BindPropertyAttribute
Inherits Attribute
Implements IBinderTypeProviderMetadata, IModelNameProvider, IRequestPredicateProvider
Herança
BindPropertyAttribute
Atributos
Implementações

Comentários

Similar a ModelBinderAttribute. Ao contrário desse atributo, BindPropertyAttribute aplica-se apenas a propriedades e adiciona uma IRequestPredicateProvider implementação que, por padrão, indica que a propriedade não deve ser associada a solicitações HTTP GET (consulte também SupportsGet).

Construtores

BindPropertyAttribute()

Um atributo que pode especificar um nome de modelo ou tipo de IModelBinder a ser usado para associar a propriedade associada.

Propriedades

BinderType

Um Type que implementa um .IModelBinder

BindingSource

Obtém o BindingSource.

Name

Nome do modelo.

SupportsGet

Obtém ou define uma indicação de que a propriedade associada deve ser associada em solicitações HTTP GET. Se truefor , a propriedade deverá ser associada em todas as solicitações. Caso contrário, a propriedade não deve ser associada em solicitações HTTP GET.

Implantações explícitas de interface

IRequestPredicateProvider.RequestPredicate

Um atributo que pode especificar um nome de modelo ou tipo de IModelBinder a ser usado para associar a propriedade associada.

Aplica-se a