Share via


BindPropertyAttribute Kelas

Definisi

Atribut yang dapat menentukan nama model atau jenis yang IModelBinder akan digunakan untuk mengikat properti terkait.

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
Warisan
BindPropertyAttribute
Atribut
Penerapan

Keterangan

Mirip dengan ModelBinderAttribute. Tidak seperti atribut tersebut, BindPropertyAttribute hanya berlaku untuk properti dan menambahkan IRequestPredicateProvider implementasi yang secara default menunjukkan properti tidak boleh terikat untuk permintaan HTTP GET (lihat juga SupportsGet).

Konstruktor

BindPropertyAttribute()

Atribut yang dapat menentukan nama model atau jenis yang IModelBinder akan digunakan untuk mengikat properti terkait.

Properti

BinderType

A Type yang mengimplementasikan baik IModelBinder.

BindingSource

BindingSourceMendapatkan .

Name

Nama model.

SupportsGet

Mendapatkan atau menetapkan indikasi properti terkait harus terikat dalam permintaan HTTP GET. Jika true, properti harus terikat di semua permintaan. Jika tidak, properti tidak boleh terikat dalam permintaan HTTP GET.

Implementasi Antarmuka Eksplisit

IRequestPredicateProvider.RequestPredicate

Atribut yang dapat menentukan nama model atau jenis yang IModelBinder akan digunakan untuk mengikat properti terkait.

Berlaku untuk