BindPropertyAttribute Třída

Definice

Atribut, který může zadat název modelu nebo typ IModelBinder , který se má použít pro vazbu přidružené vlastnosti.

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
Dědičnost
BindPropertyAttribute
Atributy
Implementuje

Poznámky

Podobá se ModelBinderAttribute. Na rozdíl od atributu platí BindPropertyAttribute pouze pro vlastnosti a přidává IRequestPredicateProvider implementaci, která ve výchozím nastavení indikuje, že vlastnost by neměla být vázána pro požadavky HTTP GET (viz také SupportsGet).

Konstruktory

BindPropertyAttribute()

Atribut, který může zadat název modelu nebo typ IModelBinder , který se má použít pro vazbu přidružené vlastnosti.

Vlastnosti

BinderType

A Type , který implementuje buď IModelBinder.

BindingSource

Získá .BindingSource

Name

Název modelu.

SupportsGet

Získá nebo nastaví indikaci přidružená vlastnost by měla být vázána v požadavcích HTTP GET. Pokud true, vlastnost by měla být svázaná ve všech požadavcích. Jinak by vlastnost neměla být vázaná v požadavcích HTTP GET.

Explicitní implementace rozhraní

IRequestPredicateProvider.RequestPredicate

Atribut, který může zadat název modelu nebo typ IModelBinder , který se má použít pro vazbu přidružené vlastnosti.

Platí pro